home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Visual Basic 5.0 (2nd Edition) / Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso / Source / WinTlb / WINUSER.IDL < prev    next >
Text File  |  1997-06-07  |  129KB  |  3,827 lines

  1.  
  2. // Enums
  3.  
  4. // USER structures
  5. typedef struct WINDOWPLACEMENT {
  6.     UINT  Length;
  7.     UINT  Flags;
  8.     ESW   ShowCmd;
  9.     POINTL ptMinPosition;
  10.     POINTL ptMaxPosition;
  11.     RECT  rcNormalPosition;
  12. } WINDOWPLACEMENT;
  13. typedef WINDOWPLACEMENT * PWINDOWPLACEMENT;
  14. typedef WINDOWPLACEMENT * LPWINDOWPLACEMENT;
  15.  
  16. typedef struct ICONINFO {
  17.     BOOL    fIcon;
  18.     DWORD   xHotspot;
  19.     DWORD   yHotspot;
  20.     HBITMAP hbmMask;
  21.     HBITMAP hbmColor;
  22. } ICONINFO;
  23.  
  24. typedef long TIMERPROC;
  25. /* void (CALLBACK* TIMERPROC)(HWND hWnd, UINT, UINT, DWORD); */
  26.  
  27. typedef long WNDENUMPROC;
  28. /* typedef BOOL (CALLBACK* WNDENUMPROC)(HWND hWnd, LPARAM); */
  29.  
  30. typedef long PROPENUMPROC;
  31. typedef long PROPENUMPROCEX;
  32. /* typedef BOOL (CALLBACK* PROPENUMPROC)(HWND hWnd, LPCTSTR, HANDLE); */
  33. /* typedef BOOL (CALLBACK* PROPENUMPROCEX)(HWND, LPSTR, HANDLE, DWORD); */
  34.  
  35. // USER function entries and constants
  36. [
  37. #ifdef UNICODE
  38. uuid(64675046-3A82-101B-8181-00AA003743D3),
  39. #else
  40. uuid(64674046-3A82-101B-8181-00AA003743D3),
  41. #endif
  42. helpstring("Windows User Functions"),
  43. dllname("USER32.DLL")
  44. ]
  45. module User {
  46.  
  47.     // ****** System Metrics ********
  48.  
  49.     [
  50.     usesgetlasterror,
  51.     entry("GetSystemMetrics"),
  52.     helpstring("Get Various system metrics and system configuration settings"),
  53.     ]
  54.     int WINAPI GetSystemMetrics(int nIndex);
  55.  
  56.     [
  57.     usesgetlasterror,
  58.     entry("GetDoubleClickTime"),
  59.     helpstring("Get current double-click time for the mouse"),
  60.     ]
  61.     UINT    WINAPI GetDoubleClickTime(void);
  62.  
  63.     [
  64.     usesgetlasterror,
  65.     entry("SetDoubleClickTime"),
  66.     helpstring("Sets double-click time for the mouse"),
  67.     ]
  68.     void    WINAPI SetDoubleClickTime(UINT uInterval);
  69.  
  70.     // ****** System Parameters support *********
  71.  
  72.     [
  73.     usesgetlasterror,
  74.     entry("SystemParametersInfo"),
  75.     helpstring("Queries or sets systemwide parameters, possibly updating the user profile while setting a parameter"),
  76.     ]
  77.     BOOL    WINAPI SystemParametersInfo(UINT uiAction, 
  78.                                         UINT uiParam, 
  79.                                         void * pvParam, 
  80.                                         UINT fWinIni);
  81.  
  82.     // ****** Rectangle support *****
  83.  
  84.     /*
  85.     void    WINAPI SetRect(RECT *, int, int, int, int);
  86.     void    WINAPI SetRectEmpty(RECT *);
  87.  
  88.     void    WINAPI CopyRect(RECT *, const RECT *);
  89.  
  90.     BOOL    WINAPI IsRectEmpty(const RECT *);
  91.  
  92.     BOOL    WINAPI EqualRect(const RECT *, const RECT *);
  93.  
  94.     BOOL    WINAPI IntersectRect(RECT *, const RECT *, const RECT *);
  95.     BOOL    WINAPI UnionRect(RECT *, const RECT *, const RECT *);
  96.     BOOL    WINAPI SubtractRect(RECT *, const RECT *, const RECT *);
  97.  
  98.     void    WINAPI OffsetRect(RECT *, int, int);
  99.     void    WINAPI InflateRect(RECT *, int, int);
  100.  
  101.     BOOL    WINAPI PtInRect(const RECT *, POINTL);
  102.     */
  103.  
  104.     // ****** Window class management *******
  105.  
  106.     /*
  107.     typedef LRESULT (CALLBACK* WNDPROC)(HWND hWnd, UINT, WPARAM, LPARAM);
  108.  
  109.     typedef struct tagWNDCLASS
  110.     {
  111.         UINT        style;
  112.         WNDPROC lpfnWndProc;
  113.         int         cbClsExtra;
  114.         int         cbWndExtra;
  115.         HINSTANCE   hInstance;
  116.         HICON   hIcon;
  117.         HCURSOR hCursor;
  118.         HBRUSH  hbrBackground;
  119.         LPCTSTR  lpszMenuName;
  120.         LPCTSTR  lpszClassName;
  121.     } WNDCLASS;
  122.     typedef WNDCLASS* PWNDCLASS;
  123.     typedef WNDCLASS NEAR* NPWNDCLASS;
  124.     typedef WNDCLASS * LPWNDCLASS;
  125.  
  126.     ATOM    WINAPI RegisterClass(const WNDCLASS *);
  127.     BOOL    WINAPI UnregisterClass(LPCTSTR, HINSTANCE hInst);
  128.  
  129.     BOOL    WINAPI GetClassInfo(HINSTANCE hInst, LPCTSTR, WNDCLASS *);
  130.     */
  131.  
  132.     [
  133.     usesgetlasterror,
  134.     #ifdef UNICODE
  135.     entry("GetClassNameW"),
  136.     #else
  137.     entry("GetClassNameA"),
  138.     #endif
  139.     helpstring("Copies the class name of a window handle to a string buffer"),
  140.     ]
  141.     int     WINAPI GetClassName(HWND hwnd, LPTSTR lpszClassName,
  142.                                 int cchClassName);
  143.  
  144.     // Class words
  145.  
  146.     [
  147.     usesgetlasterror,
  148.     entry("GetClassWord"),
  149.     helpstring("Gets the indexed class WORD data of a window handle (see GWW_ constants)")
  150.     ]
  151.     WORD    WINAPI GetClassWord(HWND hwnd, int nIndex);
  152.  
  153.     [
  154.     usesgetlasterror,
  155.     entry("SetClassWord"),
  156.     helpstring("Sets the indexed class WORD data of a window handle and returns previous data (see GWW_ constants)")
  157.     ]
  158.     WORD    WINAPI SetClassWord(HWND hwnd, int nIndex,
  159.                                 WORD nValue);
  160.  
  161.     [
  162.     usesgetlasterror,
  163.     #ifdef UNICODE
  164.     entry("GetClassLongW"),
  165.     #else
  166.     entry("GetClassLongA"),
  167.     #endif
  168.     helpstring("Gets the indexed class LONG data of a window handle (see GWL_ constants)")
  169.     ]
  170.     LONG    WINAPI GetClassLong(HWND hwnd, int nIndex);
  171.  
  172.     [
  173.     usesgetlasterror,
  174.     #ifdef UNICODE
  175.     entry("SetClassLongW"),
  176.     #else
  177.     entry("SetClassLongA"),
  178.     #endif
  179.     helpstring("Sets the indexed class LONG data of a window handle and returns previous data (see GWL_ constants)")
  180.     ]
  181.     LONG    WINAPI SetClassLong(HWND hwnd, int nIndex,
  182.                                 LONG nValue);
  183.  
  184.     // ****** Window creation/destroy *******
  185.  
  186.     [
  187.     usesgetlasterror,
  188.     entry("IsWindow"),
  189.     helpstring("Tells whether a window handle is valid")
  190.     ]
  191.     BOOL    WINAPI IsWindow(HWND hwnd);
  192.  
  193.     /*
  194.     HWND    WINAPI CreateWindowEx(DWORD, LPCTSTR lpsz, LPCTSTR lpsz, DWORD, int, int, int, int, HWND hWnd, HMENU hmenu, HINSTANCE hInst, void *);
  195.     HWND    WINAPI CreateWindow(LPCTSTR lpsz, LPCTSTR lpsz, DWORD, int, int, int, int, HWND hWnd, HMENU hmenu, HINSTANCE hInst, void *);
  196.  
  197.     BOOL    WINAPI DestroyWindow(HWND hwnd);
  198.     */
  199.  
  200.     // Basic window attributes
  201.     [
  202.     usesgetlasterror,
  203.     entry("GetWindowThreadProcessId"),
  204.     helpstring("Returns the ids of both the process and the thread that created a window")
  205.     ]
  206.     DWORD WINAPI GetWindowThreadProcessId(HWND hwnd,
  207.                                           DWORD * lpdwProcessId);
  208.  
  209.     [
  210.     usesgetlasterror,
  211.     entry("IsChild"),
  212.     helpstring("Tells whether the given child window is the child of the given parent window")
  213.     ]
  214.     BOOL    WINAPI IsChild(HWND hwndParent, HWND hwndChild);
  215.  
  216. //@B GetParent
  217.     [
  218.     usesgetlasterror,
  219.     entry("GetParent"),
  220.     helpstring("Gets the parent window handle of the given window")
  221.     ]
  222.     HWND    WINAPI GetParent(HWND hWnd);
  223. //@E GetParent
  224.  
  225.     [
  226.     usesgetlasterror,
  227.     entry("SetParent"),
  228.     helpstring("Changes the parent of the given window to the specified new parent")
  229.     ]
  230.     HWND    WINAPI SetParent(HWND hwndChild, HWND hwndNewParent);
  231.  
  232.     [
  233.     usesgetlasterror,
  234.     entry("IsWindowVisible"),
  235.     helpstring("Tells whether a window is visible")
  236.     ]
  237.     BOOL    WINAPI IsWindowVisible(HWND hwnd);
  238.  
  239.     [
  240.     usesgetlasterror,
  241.     entry("ShowWindow"),
  242.     helpstring("Sets a window's visibility state (see SW_ constants)")
  243.     ]
  244.     BOOL    WINAPI ShowWindow(HWND hwnd, ESW nCmdShow);
  245.  
  246.     // Enabled state
  247.  
  248.     [
  249.     usesgetlasterror,
  250.     entry("EnableWindow"),
  251.     helpstring("Enables or disables a window")
  252.     ]
  253.     BOOL    WINAPI EnableWindow(HWND hwnd, BOOL fEnable);
  254.  
  255.     [
  256.     usesgetlasterror,
  257.     entry("IsWindowEnabled"),
  258.     helpstring("Tells whether a window is enabled or disabled")
  259.     ]
  260.     BOOL    WINAPI IsWindowEnabled(HWND hwnd);
  261.  
  262.     // Window text
  263.  
  264.     [
  265.     usesgetlasterror,
  266.     #ifdef UNICODE 
  267.     entry("SetWindowTextW"),
  268.     #else
  269.     entry("SetWindowTextA"),
  270.     #endif
  271.     helpstring("Sets the title of a window"),
  272.     ]
  273.     void    WINAPI SetWindowText(HWND hwnd, LPCTSTR lpsz);
  274.  
  275.     [
  276.     usesgetlasterror,
  277.     #ifdef UNICODE 
  278.     entry("GetWindowTextW"),
  279.     #else
  280.     entry("GetWindowTextA"),
  281.     #endif
  282.     helpstring("Copies no more than cbMax characters of a window title to a string")
  283.     ]
  284.     int     WINAPI GetWindowText(HWND hwnd, LPTSTR lpsz,
  285.                                  int cbMax);
  286.  
  287.     [
  288.     usesgetlasterror,
  289.     entry("GetWindowTextW"),
  290.     helpstring("Copies no more than cbMax characters of a window title to a string")
  291.     ]
  292.     int     WINAPI GetWindowTextW(HWND hwnd, LPTSTR lpsz,
  293.                                   int cbMax);
  294.  
  295.     [
  296.     usesgetlasterror,
  297.     entry("GetWindowTextA"),
  298.     helpstring("Copies no more than cbMax characters of a window title to a string")
  299.     ]
  300.     int     WINAPI GetWindowTextA(HWND hwnd, LPTSTR lpsz,
  301.                                   int cbMax);
  302.  
  303.     [
  304.     usesgetlasterror,
  305.     #ifdef UNICODE 
  306.     entry("GetWindowTextLengthW"),
  307.     #else
  308.     entry("GetWindowTextLengthA"),
  309.     #endif
  310.     helpstring("Gets the character length of a window title)")
  311.     ]
  312.     int     WINAPI GetWindowTextLength(HWND hwnd);
  313.  
  314.     // Window words
  315.  
  316.     [
  317.     usesgetlasterror,
  318.     entry("GetWindowWord"),
  319.     helpstring("Gets the indexed WORD data of a window handle (see GWW_ constants)")
  320.     ]
  321.     WORD    WINAPI GetWindowWord(HWND hwnd, int nIndex);
  322.  
  323.     [
  324.     usesgetlasterror,
  325.     entry("SetWindowWord"),
  326.     helpstring("Sets the indexed WORD data of a window handle and returns previous data (see GWW_ constants)")
  327.     ]
  328.     WORD    WINAPI SetWindowWord(HWND hwnd, int nIndex,
  329.                                  WORD nValue);
  330.  
  331.     [
  332.     usesgetlasterror,
  333.     #ifdef UNICODE
  334.     entry("GetWindowLongW"),
  335.     #else
  336.     entry("GetWindowLongA"),
  337.     #endif
  338.     helpstring("Gets the indexed LONG data of a window handle (see GWL_ constants)")
  339.     ]
  340.     LONG    WINAPI GetWindowLong(HWND hwnd, int nIndex);
  341.  
  342.     [
  343.     usesgetlasterror,
  344.     #ifdef UNICODE
  345.     entry("SetWindowLongW"),
  346.     #else
  347.     entry("SetWindowLongA"),
  348.     #endif
  349.     helpstring("Sets the indexed LONG data of a window handle and returns previous data (see GWL_ constants)")
  350.     ]
  351.     LONG    WINAPI SetWindowLong(HWND hwnd, int nIndex,
  352.                                  LONG nValue);
  353.  
  354.     // Window Styles
  355.  
  356.     // ****** Window size, position, Z-order, and visibility *******
  357.  
  358.     [
  359.     usesgetlasterror,
  360.     entry("GetClientRect"),
  361.     helpstring("Retrieves coordinates of a window's client area")
  362.     ]
  363.     void    WINAPI GetClientRect(HWND hwnd, RECT * lpRect);
  364.  
  365.     [
  366.     usesgetlasterror,
  367.     entry("GetWindowRect"),
  368.     helpstring("Retrieves coordinates of a window's bounding rectangle")
  369.     ]
  370.     void    WINAPI GetWindowRect(HWND hwnd, RECT * lpRect);
  371.     
  372.     [
  373.     usesgetlasterror,
  374.     entry("GetWindowPlacement"),
  375.     helpstring("Gets the show state and the restored, minimized, and maximized positions of the specified window")
  376.     ]
  377.     BOOL    WINAPI GetWindowPlacement(HWND hwnd, WINDOWPLACEMENT * lpwndpl);
  378.  
  379.     [
  380.     usesgetlasterror,
  381.     entry("SetWindowPlacement"),
  382.     helpstring("Sets the show state and the restored, minimized, and maximized positions of the specified window")
  383.     ]
  384.     BOOL WINAPI SetWindowPlacement(HWND hwnd, WINDOWPLACEMENT * lpwndpl);
  385.  
  386.     [
  387.     usesgetlasterror,
  388.     entry("SetWindowPos"),
  389.     helpstring("Changes the window size, position, and z-order of a window")
  390.     ]
  391.     BOOL    WINAPI SetWindowPos(HWND hwnd, HWND hwndInsertAfter,
  392.                                 int x, int y,
  393.                                 int cx, int cy,
  394.                                 UINT fuFlags);
  395.  
  396.  
  397.     [
  398.     usesgetlasterror,
  399.     entry("BeginDeferWindowPos"),
  400.     helpstring("Allocates memory for a multiple-window-position structure and returns the handle to the structure"),
  401.     ]
  402.     HDWP    WINAPI BeginDeferWindowPos(int nNumWindows);
  403.  
  404.     [
  405.     usesgetlasterror,
  406.     entry("DeferWindowPos"),
  407.     helpstring("Updates the specified multiple-window-position structure for the specified window"),
  408.     ]
  409.     HDWP    WINAPI DeferWindowPos(HDWP hWinPosInfo, 
  410.                                   HWND hWnd, 
  411.                                   HWND hWndInsertAfter, 
  412.                                   int x, int y, 
  413.                                   int cx, int cy, 
  414.                                   UINT uFlags);
  415.  
  416.     [
  417.     usesgetlasterror,
  418.     entry("EndDeferWindowPos"),
  419.     helpstring("Updates the position and size of one or more windows in a single screen-refreshing cycle"),
  420.     ]
  421.     BOOL    WINAPI EndDeferWindowPos(HDWP hWinPosInfo);
  422.  
  423.     [
  424.     usesgetlasterror,
  425.     entry("MoveWindow"),
  426.     helpstring("Changes the position and dimensions of the specified window"),
  427.     ]
  428.     BOOL    WINAPI MoveWindow(HWND hWnd, 
  429.                               int x, int y, 
  430.                               int nWidth, int nHeight, 
  431.                               BOOL bRepaint);
  432.  
  433.     [
  434.     usesgetlasterror,
  435.     entry("BringWindowToTop"),
  436.     helpstring("Brings the specified window to the top of the Z order"),
  437.     ]
  438.     BOOL    WINAPI BringWindowToTop(HWND hWnd);
  439.  
  440.     // ****** Window proc implementation & subclassing support *****
  441.  
  442.     // LRESULT WINAPI DefWindowProc(HWND hwnd, UINT, WPARAM, LPARAM);
  443.  
  444.     [
  445.     usesgetlasterror,
  446.     #ifdef UNICODE
  447.     entry("CallWindowProcW"),
  448.     #else
  449.     entry("CallWindowProcA"),
  450.     #endif
  451.     helpstring("Passes message information to a specified window procedure"),
  452.     ]
  453.     LRESULT WINAPI CallWindowProc(WNDPROC lpPrevWndFunc,
  454.                                   HWND hwnd, UINT Msg,
  455.                                   WPARAM wParam, LPARAM lParam);
  456.  
  457.     // ****** Main window support ***
  458.  
  459.     /*
  460.     void    WINAPI AdjustWindowRect(RECT *, DWORD, BOOL);
  461.     void    WINAPI AdjustWindowRectEx(RECT *, DWORD, BOOL, DWORD);
  462.  
  463.     void    WINAPI ShowOwnedPopups(HWND hwnd, BOOL);
  464.  
  465.     // Obsolete functions
  466.     BOOL    WINAPI OpenIcon(HWND hwnd);
  467.     void    WINAPI CloseWindow(HWND hwnd);
  468.     BOOL    WINAPI AnyPopup(void);
  469.     */
  470.  
  471.     [
  472.     usesgetlasterror,
  473.     entry("FlashWindow"),
  474.     helpstring("Flashes or unflashes a given window depending on fInvert")
  475.     ]
  476.     BOOL    WINAPI FlashWindow(HWND hwnd, BOOL fInvert);
  477.  
  478.     [
  479.     usesgetlasterror,
  480.     entry("IsIconic"),
  481.     helpstring("Tells whether a window is minimized")
  482.     ]
  483.     BOOL    WINAPI IsIconic(HWND hwnd);
  484.  
  485.     [
  486.     usesgetlasterror,
  487.     entry("IsZoomed"),
  488.     helpstring("Tells whether a window is maximized"),
  489.     helpcontext(357)
  490.     ]
  491.     BOOL    WINAPI IsZoomed(HWND hwnd);
  492.  
  493.     // ****** Window coordinate mapping and hit-testing **************************
  494.  
  495.     [
  496.     usesgetlasterror,
  497.     entry("ClientToScreen"),
  498.     helpstring("Converts client coordinates of specified point to screen coordinates"),
  499.     ]
  500.     BOOL WINAPI ClientToScreen(HWND hwnd, POINTL * lpPoint);
  501.  
  502.     [
  503.     usesgetlasterror,
  504.     entry("ScreenToClient"),
  505.     helpstring("Converts screen coordinates of specified point to client coordinates"),
  506.     ]
  507.     BOOL WINAPI ScreenToClient(HWND hwnd, POINTL * lpPoint);
  508.  
  509.     [
  510.     usesgetlasterror,
  511.     entry("ScreenToClient"),
  512.     helpstring("Maps a set of points from a coordinate space relative to one window to a coordinate space relative to another window"),
  513.     ]
  514.     int    WINAPI MapWindowPoints(HWND hwndFrom, HWND hwndTo, POINTL * lpPoints, UINT cPoints);
  515.  
  516.     [
  517.     usesgetlasterror,
  518.     entry("WindowFromPoint"),
  519.     helpstring("Retrieves handle of window containing a specified point"),
  520.     ]
  521.     HWND    WINAPI WindowFromPoint(long x, long y);
  522.  
  523.     [
  524.     usesgetlasterror,
  525.     entry("ChildWindowFromPoint"),
  526.     helpstring("Determines which if any child window of given window contains a specified point"),
  527.     ]
  528.     HWND    WINAPI ChildWindowFromPoint(HWND hwnd, long x, long y);
  529.  
  530.     // ****** Window query and enumeration ******
  531.  
  532.     [
  533.     usesgetlasterror,
  534.     entry("GetDesktopWindow"),
  535.     helpstring("Returns handle of desktop window"),
  536.     ]
  537.     HWND    WINAPI GetDesktopWindow();
  538.  
  539.     [
  540.     usesgetlasterror,
  541.     #ifdef UNICODE
  542.     entry("FindWindowW"),
  543.     #else
  544.     entry("FindWindowA"),
  545.     #endif
  546.     helpstring("Finds a window by its class name and title"),
  547.     ]
  548.     HWND    WINAPI FindWindow(LPCTSTR lpszClassName,
  549.                               LPCTSTR lpszWindow);
  550.  
  551.     [
  552.     usesgetlasterror,
  553.     entry("EnumWindows"),
  554.     helpstring("Enumerates all top-level windows on the screen by passing the handle of each window, in turn, to an application-defined callback function"),
  555.     ]
  556.     BOOL    WINAPI EnumWindows(WNDENUMPROC lpEnumFunction, 
  557.                                LPARAM lParam);
  558.  
  559.     [
  560.     usesgetlasterror,
  561.     entry("EnumChildWindows"),
  562.     helpstring("Enumerates the child windows that belong to the specified parent window by passing the handle of each child window, in turn, to an application-defined callback function"),
  563.     ]
  564.     BOOL    WINAPI EnumChildWindows(HWND hWndParent, 
  565.                                     WNDENUMPROC lpEnumFunction, 
  566.                                     LPARAM lParam);
  567.     
  568.     [
  569.     usesgetlasterror,
  570.     entry("GetTopWindow"),
  571.     helpstring("Gets handle of window at the top of the Z-order of a specified child window"),
  572.     ]
  573.     HWND    WINAPI GetTopWindow(HWND hwnd);
  574.  
  575.     [
  576.     usesgetlasterror,
  577.     entry("GetWindow"),
  578.     helpstring("Gets handle of window with specified relationship (GW_HWNDFIRST, GW_HWNDLAST, GW_HWNDNEXT, GW_HWNDPREV, GW_OWNER, GW_CHILD)"),
  579.     ]
  580.     HWND    WINAPI GetWindow(HWND hwnd, UINT uCmd);
  581.  
  582.     [
  583.     usesgetlasterror,
  584.     entry("GetNextWindow"),
  585.     helpstring("Gets handle of next (GW_HWNDNEXT) or previous (GW_HWNDPREV) window in the Z-order"),
  586.     ]
  587.     HWND    WINAPI GetNextWindow(HWND hwnd, UINT fuDirection);
  588.  
  589.     // ****** Omit Window property support *******
  590.  
  591.     [
  592.     usesgetlasterror,
  593.     #ifdef UNICODE
  594.     entry("SetPropW"),
  595.     #else
  596.     entry("SetPropA"),
  597.     #endif
  598.     helpstring("Adds a new entry or changes an existing entry in the property list of the specified window"),
  599.     ]
  600.     BOOL    WINAPI SetProp(HWND hWnd, LPCTSTR lpString, HANDLE hData);
  601.  
  602.     [
  603.     usesgetlasterror,
  604.     #ifdef UNICODE
  605.     entry("GetPropW"),
  606.     #else
  607.     entry("GetPropA"),
  608.     #endif
  609.     helpstring("Retrieves a data handle from the property list of the given window"),
  610.     ]
  611.     HANDLE  WINAPI GetProp(HWND hWnd, LPCTSTR lpString);
  612.  
  613.     [
  614.     usesgetlasterror,
  615.     #ifdef UNICODE
  616.     entry("RemovePropW"),
  617.     #else
  618.     entry("RemovePropA"),
  619.     #endif
  620.     helpstring("Removes an entry from the property list of the specified window"),
  621.     ]
  622.     HANDLE  WINAPI RemoveProp(HWND hWnd, LPCTSTR lpString);
  623.  
  624.     [
  625.     usesgetlasterror,
  626.     #ifdef UNICODE
  627.     entry("EnumPropsExW"),
  628.     #else
  629.     entry("EnumPropsExA"),
  630.     #endif
  631.     helpstring("Enumerates all entries in the property list of a window by passing them, one by one, to the specified callback function"),
  632.     ]
  633.     int     WINAPI EnumPropsEx(HWND hWnd, PROPENUMPROCEX lpEnumFunc, LPARAM lParam);
  634.  
  635.     [
  636.     usesgetlasterror,
  637.     #ifdef UNICODE
  638.     entry("EnumPropsW"),
  639.     #else
  640.     entry("EnumPropsA"),
  641.     #endif
  642.     helpstring("Enumerates all entries in the property list of a window by passing them, one by one, to the specified callback function"),
  643.     ]
  644.     int     WINAPI EnumProps(HWND hWnd, PROPENUMPROC lpEnumProc);
  645.  
  646.     // ****** Window drawing support ********
  647.  
  648.     [
  649.     usesgetlasterror,
  650.     entry("GetDC"),
  651.     helpstring("Gets client area DC of given window"),
  652.     ]
  653.     HDC     WINAPI GetDC(HWND hwnd);
  654.  
  655.     [
  656.     usesgetlasterror,
  657.     entry("ReleaseDC"),
  658.     helpstring("Releases a DC obtained with GetDC or GetWindowDC"),
  659.     ]
  660.     int     WINAPI ReleaseDC(HWND hwnd, HDC hdc);
  661.  
  662.     [
  663.     usesgetlasterror,
  664.     entry("GetWindowDC"),
  665.     helpstring("Gets entire DC of given window"),
  666.     ]
  667.     HDC     WINAPI GetWindowDC(HWND hwnd);
  668.  
  669.     /*
  670.     HDC     WINAPI GetDCEx(register HWND hwnd, HRGN hrgnClip, DWORD flags);
  671.     */
  672.  
  673.  
  674.     // ****** Window repainting ****
  675.  
  676.  
  677.     /* Omit
  678.     // BeginPaint() return structure
  679.     typedef struct tagPAINTSTRUCT
  680.     {
  681.         HDC     hdc;
  682.         BOOL    fErase;
  683.         RECT    rcPaint;
  684.         BOOL    fRestore;
  685.         BOOL    fIncUpdate;
  686.         BYTE    rgbReserved[16];
  687.     } PAINTSTRUCT;
  688.     typedef PAINTSTRUCT* PPAINTSTRUCT;
  689.     typedef PAINTSTRUCT NEAR* NPPAINTSTRUCT;
  690.     typedef PAINTSTRUCT * LPPAINTSTRUCT;
  691.  
  692.     HDC     WINAPI BeginPaint(HWND hwnd, PAINTSTRUCT *);
  693.     void    WINAPI EndPaint(HWND hwnd, const PAINTSTRUCT *);
  694.     */
  695.  
  696.     /*
  697.     void    WINAPI UpdateWindow(HWND hwnd);
  698.  
  699.     int     WINAPI ExcludeUpdateRgn(HDC hdc, HWND hwnd);
  700.     */
  701.  
  702.     [
  703.     usesgetlasterror,
  704.     entry("LockWindowUpdate"),
  705.     helpstring("Disables drawing in the given window, or enables drawing in the locked window if NULL is passed"),
  706.     ]
  707.     BOOL    WINAPI LockWindowUpdate(HWND hwndLock);
  708.  
  709.     /*
  710.     BOOL    WINAPI GetUpdateRect(HWND hwnd, RECT *, BOOL);
  711.     int     WINAPI GetUpdateRgn(HWND hwnd, HRGN, BOOL);
  712.  
  713.     void    WINAPI InvalidateRect(HWND hwnd, const RECT *, BOOL);
  714.     void    WINAPI ValidateRect(HWND hwnd, const RECT *);
  715.  
  716.     void    WINAPI InvalidateRgn(HWND hwnd, HRGN, BOOL);
  717.     void    WINAPI ValidateRgn(HWND hwnd, HRGN);
  718.  
  719.     BOOL    WINAPI RedrawWindow(HWND hwnd, const RECT * lprcUpdate, HRGN hrgnUpdate, UINT flags);
  720.     */
  721.  
  722.     // ****** Window scrolling *****
  723.  
  724.     /*
  725.     void     WINAPI ScrollWindow(HWND hwnd, int, int, const RECT *, const RECT *);
  726.     BOOL    WINAPI ScrollDC(HDC hdc, int, int, const RECT *, const RECT *, HRGN, RECT *);
  727.  
  728.     int     WINAPI ScrollWindowEx(HWND hwnd hwnd, int dx, int dy,
  729.                     const RECT * prcScroll, const RECT * prcClip,
  730.                     HRGN hrgnUpdate, RECT * prcUpdate, UINT flags);
  731.     */
  732.  
  733.     // ****** Window activation ****
  734.  
  735.     [
  736.     usesgetlasterror,
  737.     entry("SetActiveWindow"),
  738.     helpstring("Makes the specified top level window the active window"),
  739.     ]
  740.     HWND    WINAPI SetActiveWindow(HWND hwnd);
  741.  
  742.     [
  743.     usesgetlasterror,
  744.     entry("GetActiveWindow"),
  745.     helpstring("Gets the handle of the active window"),
  746.     ]
  747.     HWND    WINAPI GetActiveWindow(void);
  748.  
  749.     [
  750.     usesgetlasterror,
  751.     entry("SetForegroundWindow"),
  752.     helpstring("Activates the thread and the window of the specified window handle"),
  753.     ]
  754.     BOOL    WINAPI SetForegroundWindow(HWND hWnd);
  755.  
  756.     [
  757.     usesgetlasterror,
  758.     entry("GetForegroundWindow"),
  759.     helpstring("Gets the handle of the foreground window"),
  760.     ]
  761.     HWND    WINAPI GetForegroundWindow(void);
  762.  
  763.  
  764.     [
  765.     usesgetlasterror,
  766.     entry("GetLastActivePopup"),
  767.     helpstring(""),
  768.     ]
  769.     HWND    WINAPI GetLastActivePopup(HWND hwnd);
  770.  
  771.     // ****** Keyboard input support ********
  772.  
  773.     [
  774.     usesgetlasterror,
  775.     entry("SetFocus"),
  776.     helpstring("Sets keyboard input focus to given window, returning previous focus window if successful"),
  777.     ]
  778.     HWND    WINAPI SetFocus(HWND hwnd);
  779.  
  780.     [
  781.     usesgetlasterror,
  782.     entry("GetFocus"),
  783.     helpstring("Returns handle of window with keyboard input focus"),
  784.     ]
  785.     HWND    WINAPI GetFocus(void);
  786.  
  787.     [
  788.     usesgetlasterror,
  789.     entry("GetKeyState"),
  790.     helpstring("Gets state of a Windows virtual keys"),
  791.     ]
  792.     short WINAPI GetKeyState(int nKeyState);
  793.  
  794.     [
  795.     usesgetlasterror,
  796.     entry("GetAsyncKeyState"),
  797.     helpstring("Gets asynchronouse state of a Windows virtual keys"),
  798.     ]
  799.     short WINAPI GetAsyncKeyState(int nKeyState);
  800.  
  801.     [
  802.     usesgetlasterror,
  803.     entry("GetKeyboardState"),
  804.     helpstring("Gets an array of 256 bytes representing the state of Windows virtual keys"),
  805.     ]
  806.     void    WINAPI GetKeyboardState(BYTE * lpbKeyState);
  807.  
  808.     [
  809.     usesgetlasterror,
  810.     entry("SetKeyboardState"),
  811.     helpstring("Sets an array of 256 bytes representing the state of Windows virtual keys"),
  812.     ]
  813.     void    WINAPI SetKeyboardState(BYTE * lpbKeyState);
  814.  
  815.     // ****** Mouse input support **
  816.  
  817.     [
  818.     usesgetlasterror,
  819.     entry("SetCapture"),
  820.     helpstring("Sets capture of all mouse events regardless of cursor position to the given window"),
  821.     ]
  822.     HWND    WINAPI SetCapture(HWND hwnd);
  823.  
  824.     [
  825.     usesgetlasterror,
  826.     entry("ReleaseCapture"),
  827.     helpstring("Releases mouse capture and restores normal mouse input processing"),
  828.     ]
  829.     BOOL WINAPI ReleaseCapture(void);
  830.  
  831.     [
  832.     usesgetlasterror,
  833.     entry("GetCapture"),
  834.     helpstring("Gets the window handle (if any) that owns mouse capture"),
  835.     ]
  836.     HWND    WINAPI GetCapture(void);
  837.  
  838.     /*
  839.     BOOL    WINAPI SwapMouseButton(BOOL);
  840.  
  841.     typedef struct tagMOUSEHOOKSTRUCT
  842.     {
  843.         POINTL   pt;
  844.         HWND    hwnd;
  845.         UINT    wHitTestCode;
  846.         DWORD   dwExtraInfo;
  847.     } MOUSEHOOKSTRUCT;
  848.     typedef MOUSEHOOKSTRUCT  * LPMOUSEHOOKSTRUCT;
  849.     */
  850.     
  851.     // ****** Timer support ********
  852.  
  853.     [
  854.     usesgetlasterror,
  855.     entry("SetTimer"),
  856.     helpstring("Creates a timer with the specified time-out value"),
  857.     ]
  858.     UINT    WINAPI SetTimer(HWND hWnd, UINT nIDEvent, 
  859.                             UINT uElapse, TIMERPROC lpTimerFunc);
  860.  
  861.     [
  862.     usesgetlasterror,
  863.     entry("KillTimer"),
  864.     helpstring("Destroys the specified timer"),
  865.     ]
  866.     BOOL    WINAPI KillTimer(HWND hWnd, UINT uIDEvent);
  867.  
  868.     // ****** Omit Accelerator support ******
  869.  
  870.     /*
  871.     DECLARE_HANDLE(HACCEL);
  872.  
  873.     HACCEL  WINAPI LoadAccelerators(HINSTANCE hInst, LPCTSTR);
  874.  
  875.     int     WINAPI TranslateAccelerator(HWND hWnd, HACCEL, MSG *);
  876.     */
  877.  
  878.     // ****** Menu support *********
  879.  
  880.     /*
  881.     // Menu template header
  882.     typedef struct
  883.     {
  884.         UINT    versionNumber;
  885.         UINT    offset;
  886.     } MENUITEMTEMPLATEHEADER;
  887.  
  888.     // Menu template item struct
  889.     typedef struct
  890.     {
  891.         UINT    mtOption;
  892.         UINT    mtID;
  893.         char    mtString[1];
  894.     } MENUITEMTEMPLATE;
  895.     */
  896.  
  897.     [
  898.     usesgetlasterror,
  899.     entry("IsMenu"),
  900.     helpstring("Tells whether a handle is a menu handle")
  901.     ]
  902.     BOOL    WINAPI IsMenu(HMENU hmenu);
  903.  
  904.     [
  905.     usesgetlasterror,
  906.     entry("CreateMenu"),
  907.     helpstring("Creates an empty menu and returns its handle")
  908.     ]
  909.     HMENU   WINAPI CreateMenu(void);
  910.  
  911.     [
  912.     usesgetlasterror,
  913.     entry("CreatePopupMenu"),
  914.     helpstring("Creates an empty pop-up menu and returns its handle")
  915.     ]
  916.     HMENU   WINAPI CreatePopupMenu(void);
  917.  
  918.     [
  919.     usesgetlasterror,
  920.     #ifdef UNICODE
  921.     entry("LoadMenuW"),
  922.     #else
  923.     entry("LoadMenuA"),
  924.     #endif
  925.     helpstring("Loads menu resource lpszMenuName into an instance"),
  926.     ]
  927.     HMENU   WINAPI LoadMenu(HINSTANCE hInst,
  928.                             LPCTSTR lpszMenuName);
  929.  
  930.     [
  931.     usesgetlasterror,
  932.     #ifdef UNICODE
  933.     entry("LoadMenuW"),
  934.     #else
  935.     entry("LoadMenuA"),
  936.     #endif
  937.     helpstring("Loads menu resource idMenuName into an instance"),
  938.     ]
  939.     HMENU   WINAPI LoadMenuAsId(HINSTANCE hInst,
  940.                                 LONG idMenuName);
  941.  
  942.     /* Omitted
  943.     HMENU   WINAPI LoadMenuIndirect(const void *);
  944.     */
  945.  
  946.     [
  947.     usesgetlasterror,
  948.     entry("DestroyMenu"),
  949.     helpstring("Destroys the given menu and frees its resources"),
  950.     ]
  951.     BOOL    WINAPI DestroyMenu(HMENU hMenu);
  952.  
  953.     [
  954.     usesgetlasterror,
  955.     entry("GetMenu"),
  956.     helpstring("Gets the handle of the menu of the given window"),
  957.     ]
  958.     HMENU   WINAPI GetMenu(HWND hwnd);
  959.  
  960.     [
  961.     usesgetlasterror,
  962.     entry("SetMenu"),
  963.     helpstring("Sets the given window's menu to the given menu handle"),
  964.     ]
  965.     BOOL    WINAPI SetMenu(HWND hwnd, HMENU hMenu);
  966.  
  967.     [
  968.     usesgetlasterror,
  969.     entry("GetSystemMenu"),
  970.     helpstring("Gets handle of a copy of system menu, or restores the system menu if fRevert is true"),
  971.     ]
  972.     HMENU   WINAPI GetSystemMenu(HWND hwnd, BOOL fRevert);
  973.  
  974.     [
  975.     usesgetlasterror,
  976.     entry("DrawMenuBar"),
  977.     helpstring("Redraws the menu bar of the given window"),
  978.     ]
  979.     void    WINAPI DrawMenuBar(HWND hwnd);
  980.  
  981.     [
  982.     usesgetlasterror,
  983.     entry("HiliteMenuItem"),
  984.     helpstring("Changes menu hilite of idHiliteItem in top level menu hMenu in hWnd window according to fuHilite flags (MF_ constant)"),
  985.     ]
  986.     BOOL    WINAPI HiliteMenuItem(HWND hwnd, HMENU hMenu,
  987.                                   UINT idHiliteItem,
  988.                                   UINT fuHilite);
  989.  
  990.     [
  991.     usesgetlasterror,
  992.     #ifdef UNICODE
  993.     entry("InsertMenuW"),
  994.     #else
  995.     entry("InsertMenuA"),
  996.     #endif
  997.     helpstring("Inserts new item with ID idNewItem and content lpNewItem into menu hMenu before item idItem according to fuFlags"),
  998.     ]
  999.     BOOL    WINAPI InsertMenu(HMENU hMenu, UINT idItem,
  1000.                               UINT fuFlags, UINT idNewItem,
  1001.                               LPCTSTR lpNewItem);
  1002.  
  1003.     [
  1004.     usesgetlasterror,
  1005.     #ifdef UNICODE
  1006.     entry("AppendMenuW"),
  1007.     #else
  1008.     entry("AppendMenuA"),
  1009.     #endif
  1010.     helpstring("Appends new item with ID idNewItem and content lpNewItem to the end of menu hMenu according to fuFlags"),
  1011.     ]
  1012.     BOOL    WINAPI AppendMenu(HMENU hMenu, UINT fuFlags,
  1013.                               UINT idNewItem, LPCTSTR lpNewItem);
  1014.  
  1015.     [
  1016.     usesgetlasterror,
  1017.     #ifdef UNICODE
  1018.     entry("ModifyMenuW"),
  1019.     #else
  1020.     entry("ModifyMenuA"),
  1021.     #endif
  1022.     helpstring("Modifies item with ID idItem of menu hMenu to ID idNewItem and content lpNewItem according to fuFlags"),
  1023.     ]
  1024.     BOOL    WINAPI ModifyMenu(HMENU hMenu, UINT idItem,
  1025.                               UINT fuFlags, UINT idNewItem,
  1026.                               LPCTSTR lpNewItem);
  1027.  
  1028.     [
  1029.     usesgetlasterror,
  1030.     entry("RemoveMenu"),
  1031.     helpstring("Deletes item with ID idItem (according to fuFlags) from menu hMenu"),
  1032.     ]
  1033.     BOOL    WINAPI RemoveMenu(HMENU hMenu, UINT idItem,
  1034.                               UINT fuFlags);
  1035.  
  1036.     [
  1037.     usesgetlasterror,
  1038.     entry("DeleteMenu"),
  1039.     helpstring("Removes a popup menu item with ID idItem (according to fuFlags) from menu hMenu (should come from GetSubMenu) without deleting menu handle"),
  1040.     ]
  1041.     BOOL    WINAPI DeleteMenu(HMENU hMenu, UINT idItem,
  1042.                               UINT fuFlags);
  1043.  
  1044.     /* Omit (obsolete)
  1045.     BOOL    WINAPI ChangeMenu(HMENU hMenu, UINT, LPCTSTR, UINT, UINT);
  1046.     */
  1047.  
  1048.     [
  1049.     usesgetlasterror,
  1050.     entry("EnableMenuItem"),
  1051.     helpstring("Enables or disables item idEnableItem in hMenu according to uEnable flags"),
  1052.     ]
  1053.     BOOL    WINAPI EnableMenuItem(HMENU hMenu,
  1054.                                   UINT idEnableItem,
  1055.                                   UINT uEnable);
  1056.  
  1057.     [
  1058.     usesgetlasterror,
  1059.     entry("CheckMenuItem"),
  1060.     helpstring("Checks or unchecks item idCheckItem in hMenu according to uCheck flags"),
  1061.     ]
  1062.     BOOL    WINAPI CheckMenuItem(HMENU hMenu, UINT idCheckItem,
  1063.                                  UINT uCheck);
  1064.     [
  1065.     usesgetlasterror,
  1066.     entry("GetSubMenu"),
  1067.     helpstring("Returns handle of handle of the submenu at position nPos in menu hMenu"),
  1068.     ]
  1069.     HMENU   WINAPI GetSubMenu(HMENU hMenu, int nPos);
  1070.  
  1071.     [
  1072.     usesgetlasterror,
  1073.     entry("GetMenuItemCount"),
  1074.     helpstring("Returns the number of items in a menu"),
  1075.     ]
  1076.     int     WINAPI GetMenuItemCount(HMENU hMenu);
  1077.  
  1078.     [
  1079.     usesgetlasterror,
  1080.     entry("GetMenuItemID"),
  1081.     helpstring("Returns the ID of item as given position in a menu"),
  1082.     ]
  1083.     UINT    WINAPI GetMenuItemID(HMENU hMenu, int pos);
  1084.  
  1085.     [
  1086.     usesgetlasterror,
  1087.     #ifdef UNICODE
  1088.     entry("GetMenuStringW"),
  1089.     #else
  1090.     entry("GetMenuStringA"),
  1091.     #endif
  1092.     helpstring("Copies the text of item idItem (according to fuFlags) in menu hMenu into the buffer lpsz"),
  1093.     ]
  1094.     int     WINAPI GetMenuString(HMENU hMenu, UINT idItem,
  1095.                                  LPTSTR lpsz, int cbMax,
  1096.                                  UINT fuFlags);
  1097.  
  1098.     [
  1099.     usesgetlasterror,
  1100.     entry("GetMenuState"),
  1101.     helpstring("Returns bitflag state of item idItem in menu hMenu according to fuFlags"),
  1102.     ]
  1103.     UINT    WINAPI GetMenuState(HMENU hMenu, UINT idItem,
  1104.                                 UINT fuFlags);
  1105.  
  1106.     [
  1107.     usesgetlasterror,
  1108.     entry("SetMenuItemBitmaps"),
  1109.     helpstring("Sets item idItem (according to fuFlags) of menu hMenu to the given bitmaps"),
  1110.     ]
  1111.     BOOL    WINAPI SetMenuItemBitmaps(HMENU hMenu, UINT idItem,
  1112.                                       UINT fuFlags,
  1113.                                       HBITMAP hbmUnchecked,
  1114.                                       HBITMAP hbmChecked);
  1115.  
  1116.     [
  1117.     usesgetlasterror,
  1118.     entry("GetMenuCheckMarkDimensions"),
  1119.     helpstring("Returns dimensions of default checkmark bitmap with width in pixels in low word and height in high word"),
  1120.     ]
  1121.     DWORD   WINAPI GetMenuCheckMarkDimensions(void);
  1122.  
  1123.     [
  1124.     usesgetlasterror,
  1125.     entry("TrackPopupMenu"),
  1126.     helpstring("Displays a popup menu at the specified locations and tracks the selection of items on the menu"),
  1127.     ]
  1128.     BOOL WINAPI TrackPopupMenu(HMENU hMenu, UINT fuFlags,
  1129.                                int x, int y,
  1130.                                int nReserved, HWND hwnd,
  1131.                                LPVOID lprc);
  1132.  
  1133.     // ****** Scroll bar support ***
  1134.  
  1135.     [
  1136.     usesgetlasterror,
  1137.     entry("SetScrollPos"),
  1138.     helpstring("Sets the scroll box position and optionally redraws the scroll bar (see SB_ constants)"),
  1139.     ]
  1140.     int     WINAPI SetScrollPos(HWND hwnd, int fnBar,
  1141.                                 int nPos, BOOL fRepaint);
  1142.  
  1143.     [
  1144.     usesgetlasterror,
  1145.     entry("GetScrollPos"),
  1146.     helpstring("Gets the scroll box position (see SB_ constants)"),
  1147.     ]
  1148.     int     WINAPI GetScrollPos(HWND hwnd, int fnBar);
  1149.  
  1150.     [
  1151.     usesgetlasterror,
  1152.     entry("SetScrollRange"),
  1153.     helpstring("Sets the minimum and maximum positions of a scroll bar and optionally redraws it (see SB_ constants)"),
  1154.     ]
  1155.     void    WINAPI SetScrollRange(HWND hwnd, int fnBar,
  1156.                                   int nMin, int nMax,
  1157.                                   BOOL fRedraw);
  1158.  
  1159. //@B GetScrollRange
  1160.     [
  1161.     usesgetlasterror,
  1162.     entry("GetScrollRange"),
  1163.     helpstring("Gets the minimum and maximum positions of a scroll bar"),
  1164.     ]
  1165.     void    WINAPI GetScrollRange(HWND hwnd, int fnBar,
  1166.                                   int * lpnMinPos,
  1167.                                   int * lpnMaxPos);
  1168. //@E GetScrollRange
  1169.  
  1170.     [
  1171.     usesgetlasterror,
  1172.     entry("ShowScrollBar"),
  1173.     helpstring("Shows or hides a scroll bar (see SB_ constants)"),
  1174.     ]
  1175.     void    WINAPI ShowScrollBar(HWND hwnd, int fnBar,
  1176.                                  BOOL fShow);
  1177.  
  1178.     [
  1179.     usesgetlasterror,
  1180.     entry("EnableScrollBar"),
  1181.     helpstring("Enables or disables scroll bar arrows (see SB_ and ESB_ constants)"),
  1182.     ]
  1183.     BOOL    WINAPI EnableScrollBar(HWND hwnd, int fnSBFlags,
  1184.                                    UINT fuArrowFlags);
  1185.  
  1186.     // ******* Clipboard manager ******
  1187.  
  1188.     /*
  1189.     // Clipboard Manager Functions
  1190.     BOOL    WINAPI OpenClipboard(HWND hwnd);
  1191.     BOOL    WINAPI CloseClipboard(void);
  1192.     BOOL    WINAPI EmptyClipboard(void);
  1193.  
  1194.     HWND    WINAPI GetOpenClipboardWindow(void);
  1195.  
  1196.     HWND    WINAPI GetClipboardOwner(void);
  1197.  
  1198.     HWND    WINAPI SetClipboardViewer(HWND);
  1199.     HWND    WINAPI GetClipboardViewer(void);
  1200.  
  1201.     HANDLE  WINAPI SetClipboardData(UINT, HANDLE);
  1202.     HANDLE  WINAPI GetClipboardData(UINT);
  1203.  
  1204.     BOOL    WINAPI IsClipboardFormatAvailable(UINT);
  1205.     int     WINAPI GetPriorityClipboardFormat(UINT *, int);
  1206.  
  1207.     UINT    WINAPI RegisterClipboardFormat(LPCTSTR);
  1208.     int     WINAPI CountClipboardFormats(void);
  1209.     UINT    WINAPI EnumClipboardFormats(UINT);
  1210.     int     WINAPI GetClipboardFormatName(UINT, LPTSTR, int);
  1211.  
  1212.     BOOL    WINAPI ChangeClipboardChain(HWND hwnd, HWND hwnd);
  1213.     */
  1214.  
  1215.     // ****** Mouse cursor support **
  1216.  
  1217.     [
  1218.     usesgetlasterror,
  1219.     #ifdef UNICODE
  1220.     entry("LoadCursorW"),
  1221.     #else
  1222.     entry("LoadCursorA"),
  1223.     #endif
  1224.     helpstring("Load a cursor given by ID number from resource and return the cursor handle"),
  1225.     ]
  1226.     HCURSOR WINAPI LoadCursorAsId(HINSTANCE hInst, LONG idCursor);
  1227.  
  1228.     [
  1229.     usesgetlasterror,
  1230.     #ifdef UNICODE
  1231.     entry("LoadCursorW"),
  1232.     #else
  1233.     entry("LoadCursorA"),
  1234.     #endif
  1235.     helpstring("Load a cursor given by string name from resource and return the cursor handle"),
  1236.     ]
  1237.     HCURSOR WINAPI LoadCursor(HINSTANCE hInst, LPTSTR pszCursor);
  1238.  
  1239.     [
  1240.     usesgetlasterror,
  1241.     #ifdef UNICODE
  1242.     entry("LoadCursorW"),
  1243.     #else
  1244.     entry("LoadCursorA"),
  1245.     #endif
  1246.     helpstring("Load a cursor given by string name from resource and return the cursor handle"),
  1247.     ]
  1248.     HCURSOR WINAPI LoadCursorAsStr(HINSTANCE hInst, LPTSTR pszCursor);
  1249.  
  1250.     [
  1251.     usesgetlasterror,
  1252.     entry("DestroyCursor"),
  1253.     helpstring("Destroys a cursor previously created with CreateCursor or LoadCursor and frees its memory"),
  1254.     ]
  1255.     BOOL    WINAPI DestroyCursor(HCURSOR hcur);
  1256.  
  1257.     [
  1258.     usesgetlasterror,
  1259.     entry("SetCursor"),
  1260.     helpstring("Changes the current cursor to the given cursor or removes the cursor if NULL is passed (returns previous)"),
  1261.     ]
  1262.     HCURSOR WINAPI SetCursor(HCURSOR hcur);
  1263.  
  1264.     [
  1265.     usesgetlasterror,
  1266.     entry("GetCursor"),
  1267.     helpstring("Gets the handle of the current cursor"),
  1268.     ]
  1269.     HCURSOR WINAPI GetCursor(void);
  1270.  
  1271.     /*
  1272.     HCURSOR WINAPI CreateCursor(HINSTANCE hInst, int, int, int, int, const void *, const void *);
  1273.     HCURSOR WINAPI CopyCursor(HINSTANCE hInst, HCURSOR hcur);
  1274.     */
  1275.  
  1276.     [
  1277.     usesgetlasterror,
  1278.     entry("ShowCursor"),
  1279.     helpstring("Show or hide the mouse cursor"),
  1280.     ]
  1281.     int     WINAPI ShowCursor(BOOL bShow);
  1282.  
  1283.     [
  1284.     usesgetlasterror,
  1285.     entry("SetCursorPos"),
  1286.     helpstring("Sets the mouse cursor position"),
  1287.     ]
  1288.     void    WINAPI SetCursorPos(int x, int y);
  1289.  
  1290.     [
  1291.     usesgetlasterror,
  1292.     entry("GetCursorPos"),
  1293.     helpstring("Gets the mouse cursor position"),
  1294.     ]
  1295.     void    WINAPI GetCursorPos(int * lpPoint);
  1296.  
  1297.     [
  1298.     usesgetlasterror,
  1299.     entry("ClipCursor"),
  1300.     helpstring("Confines the mouse cursor to a given rectangle"),
  1301.     ]
  1302.     void    WINAPI ClipCursor(int * lpRect);
  1303.  
  1304.     [
  1305.     usesgetlasterror,
  1306.     entry("GetClipCursor"),
  1307.     helpstring("Gets the rectangle where the mouse cursor is confined"),
  1308.     ]
  1309.     void    WINAPI GetClipCursor(int * lpRect);
  1310.  
  1311.     // ****** Bitmap resource **********
  1312.  
  1313.     [
  1314.     usesgetlasterror,
  1315.     #ifdef UNICODE
  1316.     entry("LoadBitmapW"),
  1317.     #else
  1318.     entry("LoadBitmapA"),
  1319.     #endif
  1320.     helpstring("Load a bitmap given by ID number from resource and return bitmap handle"),
  1321.     ]
  1322.     HBITMAP WINAPI LoadBitmapAsId(HINSTANCE hInst, LONG idBitmap);
  1323.  
  1324.     [
  1325.     usesgetlasterror,
  1326.     #ifdef UNICODE
  1327.     entry("LoadBitmapW"),
  1328.     #else
  1329.     entry("LoadBitmapA"),
  1330.     #endif
  1331.     helpstring("Load a bitmap given by string name from resource and return bitmap handle"),
  1332.     ]
  1333.     HBITMAP WINAPI LoadBitmap(HINSTANCE hInst, LPTSTR pszBitmap);
  1334.  
  1335.     [
  1336.     usesgetlasterror,
  1337.     #ifdef UNICODE
  1338.     entry("LoadBitmapW"),
  1339.     #else
  1340.     entry("LoadBitmapA"),
  1341.     #endif
  1342.     helpstring("Load a bitmap given by string name from resource and return bitmap handle"),
  1343.     ]
  1344.     HBITMAP WINAPI LoadBitmapAsStr(HINSTANCE hInst, LPTSTR pszBitmap);
  1345.  
  1346.     // ****** String resource **********
  1347.  
  1348.     [
  1349.     usesgetlasterror,
  1350.     #ifdef UNICODE
  1351.     entry("LoadStringW"),
  1352.     #else
  1353.     entry("LoadStringA"),
  1354.     #endif
  1355.     helpstring("Load a string given by ID number from resource into string buffer and return string length"),
  1356.     ]
  1357.     int     WINAPI LoadString(HINSTANCE hInst, UINT idResource,
  1358.                               LPCTSTR lpszBuffer, int cbBuffer);
  1359.  
  1360.     [
  1361.     usesgetlasterror,
  1362.     entry("LoadStringW"),
  1363.     helpstring("Load a string given by ID number from resource into string buffer and return string length"),
  1364.     ]
  1365.     int     WINAPI LoadStringW(HINSTANCE hInst, UINT idResource,
  1366.                                LPCTSTR lpszBuffer, int cbBuffer);
  1367.  
  1368.     [
  1369.     usesgetlasterror,
  1370.     entry("LoadStringA"),
  1371.     helpstring("Load a string given by ID number from resource into string buffer and return string length"),
  1372.     ]
  1373.     int     WINAPI LoadStringA(HINSTANCE hInst, UINT idResource,
  1374.                                LPCTSTR lpszBuffer, int cbBuffer);
  1375.  
  1376.     // ****** Icon support **********
  1377.  
  1378.     [
  1379.     usesgetlasterror,
  1380.     #ifdef UNICODE
  1381.     entry("LoadIconW"),
  1382.     #else
  1383.     entry("LoadIconA"),
  1384.     #endif
  1385.     helpstring("Load an icon given by ID number from resource and return bitmap handle"),
  1386.     ]
  1387.     HICON WINAPI LoadIconAsId(HINSTANCE hInst, LONG idIcon);
  1388.  
  1389.     [
  1390.     usesgetlasterror,
  1391.     #ifdef UNICODE
  1392.     entry("LoadIconW"),
  1393.     #else
  1394.     entry("LoadIconA"),
  1395.     #endif
  1396.     helpstring("Load a bitmap given by string name from resource and return icon handle"),
  1397.     ]
  1398.     HICON WINAPI LoadIcon(HINSTANCE hInst, LPTSTR pszIcon);
  1399.  
  1400.     [
  1401.     usesgetlasterror,
  1402.     #ifdef UNICODE
  1403.     entry("LoadIconW"),
  1404.     #else
  1405.     entry("LoadIconA"),
  1406.     #endif
  1407.     helpstring("Load an icon given by string name from resource and return icon handle"),
  1408.     ]
  1409.     HICON WINAPI LoadIconAsStr(HINSTANCE hInst, LPTSTR pszIcon);
  1410.  
  1411.     [
  1412.     usesgetlasterror,
  1413.     entry("DestroyIcon"),
  1414.     helpstring("Destroys an icon previously created with CreateIcon or LoadIcon and frees its memory"),
  1415.     ]
  1416.     BOOL    WINAPI DestroyIcon(HICON hicon);
  1417.  
  1418.     [
  1419.     usesgetlasterror,
  1420.     entry("LookupIconIdFromDirectory"),
  1421.     helpstring("Searches through icon or cursor data for the icon or cursor that best fits the current display device"),
  1422.     ]
  1423.     int WINAPI LookupIconIdFromDirectory(
  1424.         BYTE * presbits,
  1425.         BOOL fIcon);
  1426.  
  1427.     [
  1428.     usesgetlasterror,
  1429.     entry("LookupIconIdFromDirectoryEx"),
  1430.     helpstring("Searches through icon or cursor data for the icon or cursor that best fits the current display device"),
  1431.     ]
  1432.     int WINAPI LookupIconIdFromDirectoryEx(
  1433.         BYTE  * presbits,
  1434.         BOOL  fIcon,
  1435.         int   cxDesired,
  1436.         int   cyDesired,
  1437.         UINT  Flags);
  1438.  
  1439.     [
  1440.     usesgetlasterror,
  1441.     entry("CreateIconFromResource"),
  1442.     helpstring("Creates an icon or cursor from resource bits describing the icon"),
  1443.     ]
  1444.     HICON WINAPI CreateIconFromResource(
  1445.         BYTE * presbits,
  1446.         DWORD dwResSize,
  1447.         BOOL fIcon,
  1448.         DWORD dwVer);
  1449.  
  1450.     [
  1451.     usesgetlasterror,
  1452.     entry("CreateIconFromResourceEx"),
  1453.     helpstring("Creates an icon or cursor from resource bits describing the icon"),
  1454.     ]
  1455.     HICON WINAPI CreateIconFromResourceEx(
  1456.         BYTE  * presbits,
  1457.         DWORD dwResSize,
  1458.         BOOL  fIcon,
  1459.         DWORD dwVer,
  1460.         int   cxDesired,
  1461.         int   cyDesired,
  1462.         UINT  Flags);
  1463.  
  1464.     [
  1465.     usesgetlasterror,
  1466.     entry("DrawIcon"),
  1467.     helpstring("Draws an icon into the given device context at the given coordinates"),
  1468.     ]
  1469.     BOOL    WINAPI DrawIcon(HDC hdc, int x, int y,
  1470.                             HICON hicon);
  1471.  
  1472.     [
  1473.     usesgetlasterror,
  1474.     entry("CreateIcon"),
  1475.     helpstring("Creates an icon that has the specified size, colors, and bit patterns"),
  1476.     ]
  1477.     HICON WINAPI CreateIcon(HINSTANCE hInstance,
  1478.                             int nWidth, int nHeight,
  1479.                             BYTE cPlanes, BYTE cBitsPixel,
  1480.                             BYTE * lpbANDbits, BYTE * lpbXORbits);
  1481.  
  1482.     [
  1483.     usesgetlasterror,
  1484.     entry("CreateIconIndirect"),
  1485.     helpstring("Creates an icon that has size, colors, and bit patterns specified in a structure variable"),
  1486.     ]
  1487.     HICON WINAPI CreateIconIndirect(ICONINFO * piconinfo);
  1488.  
  1489.     [
  1490.     usesgetlasterror,
  1491.     entry("CopyIcon"),
  1492.     helpstring("Copies the specified icon from another module to the current module"),
  1493.     ]
  1494.     HICON WINAPI CopyIcon(HICON hIcon);
  1495.  
  1496.     [
  1497.     usesgetlasterror,
  1498.     entry("GetIconInfo"),
  1499.     helpstring("Retrieves information about the specified icon or cursor"),
  1500.     ]
  1501.     BOOL WINAPI GetIconInfo(HICON hIcon, ICONINFO * piconinfo);
  1502.  
  1503.     // Image support
  1504.  
  1505.     [
  1506.     usesgetlasterror,
  1507.     #ifdef UNICODE
  1508.     entry("LoadImageW"),
  1509.     #else
  1510.     entry("LoadImageA"),
  1511.     #endif
  1512.     helpstring("Loads icon, bitmap, or cursor and returns handle"),
  1513.     ]
  1514.     HANDLE  WINAPI LoadImage(HINSTANCE hinst,
  1515.                              LPCTSTR lpszName, UINT uType,
  1516.                              int cxDesired, int cyDesired,
  1517.                              UINT fuLoad);
  1518.  
  1519.     [
  1520.     usesgetlasterror,
  1521.     #ifdef UNICODE
  1522.     entry("LoadImageW"),
  1523.     #else
  1524.     entry("LoadImageA"),
  1525.     #endif
  1526.     helpstring("Loads icon, bitmap, or cursor from resource ID and returns handle"),
  1527.     ]
  1528.     HANDLE  WINAPI LoadImageID(HINSTANCE hinst,
  1529.                                UINT idName, UINT uType,
  1530.                                int cxDesired, int cyDesired,
  1531.                                UINT fuLoad);
  1532.     [
  1533.     usesgetlasterror,
  1534.     entry("CopyImage"),
  1535.     helpstring("Copies icon, bitmap, or cursor to new image, stretching if necessary"),
  1536.     ]
  1537.     HICON   WINAPI CopyImage(HANDLE hImage, UINT uType,
  1538.                              int cxDesired, int cyDesired,
  1539.                              UINT fuFlags);
  1540.  
  1541.     [
  1542.     usesgetlasterror,
  1543.     entry("DrawIconEx"),
  1544.     helpstring("Draws an icon or cursor with specified raster and stretching as required"),
  1545.     ]
  1546.     BOOL WINAPI DrawIconEx(HDC hdc, int xLeft, int yTop,
  1547.                            HICON hIcon,
  1548.                            int cxWidth, int cyWidth,
  1549.                            UINT istepIfAniCur,
  1550.                            HBRUSH hbrFlickerFreeDraw,
  1551.                            UINT diFlags);
  1552.  
  1553.     // ****** Message Box support **
  1554.  
  1555.     [
  1556.     usesgetlasterror,
  1557.     #ifdef UNICODE
  1558.     entry("MessageBoxW"),
  1559.     #else
  1560.     entry("MessageBoxA"),
  1561.     #endif
  1562.     helpstring("Creates, displays, and operates a message box"),
  1563.     ]
  1564.     int     WINAPI MessageBox(HWND hwnd, LPCTSTR lpText,
  1565.                               LPCTSTR lpCaption, UINT uType);
  1566.  
  1567.     [
  1568.     usesgetlasterror,
  1569.     entry("MessageBeep"),
  1570.     helpstring("Plays a specified waveform sound"),
  1571.     ]
  1572.     BOOL WINAPI MessageBeep(UINT uType);
  1573.  
  1574.     // ****** Caret support *********
  1575.  
  1576.     /*
  1577.     void    WINAPI CreateCaret(HWND hwnd, HBITMAP hbm, int, int);
  1578.     void    WINAPI DestroyCaret(void);
  1579.  
  1580.     void    WINAPI SetCaretPos(int, int);
  1581.     void    WINAPI GetCaretPos(POINTL *);
  1582.  
  1583.     void    WINAPI HideCaret(HWND hwnd);
  1584.     void    WINAPI ShowCaret(HWND hwnd);
  1585.  
  1586.     UINT    WINAPI GetCaretBlinkTime(void);
  1587.     void    WINAPI SetCaretBlinkTime(UINT);
  1588.     */
  1589.  
  1590.     // ****** MDI Support **********
  1591.  
  1592.     /*
  1593.     // CreateWindow lpParams structure for creating MDI client
  1594.     typedef struct tagCLIENTCREATESTRUCT
  1595.     {
  1596.         HMENU  hWindowMenu;
  1597.         UINT   idFirstChild;
  1598.     } CLIENTCREATESTRUCT;
  1599.     typedef CLIENTCREATESTRUCT * LPCLIENTCREATESTRUCT;
  1600.  
  1601.     // MDI client style bits
  1602.  
  1603.     LRESULT WINAPI DefFrameProc(HWND hwnd, HWND hwnd, UINT, WPARAM, LPARAM lParam);
  1604.     LRESULT WINAPI DefMDIChildProc(HWND hwnd, UINT, WPARAM, LPARAM lParam);
  1605.  
  1606.     BOOL    WINAPI TranslateMDISysAccel(HWND hwnd, MSG *);
  1607.  
  1608.     UINT    WINAPI ArrangeIconicWindows(HWND hwnd);
  1609.     */
  1610.  
  1611.     // ****** Dialog and Control Management *****
  1612.  
  1613.     /*
  1614.     typedef BOOL (CALLBACK* DLGPROC)(HWND hWnd, UINT, WPARAM, LPARAM lParam);
  1615.  
  1616.     BOOL    WINAPI IsDialogMessage(HWND hwnd, MSG *);
  1617.  
  1618.     LRESULT WINAPI DefDlgProc(HWND hwnd, UINT, WPARAM, LPARAM lParam);
  1619.  
  1620.     HWND    WINAPI CreateDialog(HINSTANCE hInst, LPCTSTR, HWND hwnd, DLGPROC);
  1621.     HWND    WINAPI CreateDialogIndirect(HINSTANCE hInst, const void *, HWND hwnd, DLGPROC);
  1622.     HWND    WINAPI CreateDialogParam(HINSTANCE hInst, LPCTSTR, HWND hwnd, DLGPROC, LPARAM lParam);
  1623.     HWND    WINAPI CreateDialogIndirectParam(HINSTANCE hInst, const void *, HWND hwnd, DLGPROC, LPARAM lParam);
  1624.  
  1625.     int     WINAPI DialogBox(HINSTANCE hInst, LPCTSTR, HWND hwnd, DLGPROC);
  1626.     int     WINAPI DialogBoxIndirect(HINSTANCE hInst, HGLOBAL, HWND hwnd, DLGPROC);
  1627.     int     WINAPI DialogBoxParam(HINSTANCE hInst, LPCTSTR, HWND hwnd, DLGPROC, LPARAM lParam);
  1628.     int     WINAPI DialogBoxIndirectParam(HINSTANCE hInst, HGLOBAL, HWND hwnd, DLGPROC, LPARAM lParam);
  1629.  
  1630.     void    WINAPI EndDialog(HWND hwnd, int);
  1631.  
  1632.     int     WINAPI GetDlgCtrlID(HWND);
  1633.     HWND    WINAPI GetDlgItem(HWND hWnd, int);
  1634.     LRESULT WINAPI SendDlgItemMessage(HWND hwnd, int, UINT, WPARAM, LPARAM lParam);
  1635.  
  1636.     void    WINAPI SetDlgItemInt(HWND hwnd, int, UINT, BOOL);
  1637.     UINT    WINAPI GetDlgItemInt(HWND hwnd, int, BOOL * , BOOL);
  1638.  
  1639.     void    WINAPI SetDlgItemText(HWND hwnd, int, LPCTSTR);
  1640.     int     WINAPI GetDlgItemText(HWND hwnd, int, LPTSTR, int);
  1641.  
  1642.     void    WINAPI CheckDlgButton(HWND hwnd, int, UINT);
  1643.     void    WINAPI CheckRadioButton(HWND hwnd, int, int, int);
  1644.     UINT    WINAPI IsDlgButtonChecked(HWND hwnd, int);
  1645.  
  1646.     HWND    WINAPI GetNextDlgGroupItem(HWND hWnd, HWND hWnd, BOOL);
  1647.     HWND    WINAPI GetNextDlgTabItem(HWND hWnd, HWND hWnd, BOOL);
  1648.  
  1649.     void    WINAPI MapDialogRect(HWND hWnd, RECT *);
  1650.     DWORD   WINAPI GetDialogBaseUnits(void);
  1651.  
  1652.  
  1653.     */
  1654.  
  1655.     // ****** Dialog directory support ******
  1656.  
  1657.     /*
  1658.     int     WINAPI DlgDirList(HWND hWnd, LPTSTR, int, int, UINT);
  1659.     BOOL    WINAPI DlgDirSelect(HWND hWnd, LPTSTR, int);
  1660.  
  1661.     int     WINAPI DlgDirListComboBox(HWND hWnd, LPTSTR, int, int, UINT);
  1662.     BOOL    WINAPI DlgDirSelectComboBox(HWND hWnd, LPTSTR, int);
  1663.  
  1664.     BOOL    WINAPI DlgDirSelectEx(HWND hWnd, LPTSTR, int, int);
  1665.     BOOL    WINAPI DlgDirSelectComboBoxEx(HWND hWnd, LPTSTR, int, int);
  1666.     */
  1667.  
  1668.     // ******* Omit Windows hook support ******
  1669.  
  1670.     /*
  1671.     DECLARE_HANDLE32(HHOOK);
  1672.  
  1673.     typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
  1674.  
  1675.     HHOOK   WINAPI SetWindowsHook(int, HOOKPROC);
  1676.     LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HHOOK *);
  1677.     BOOL    WINAPI UnhookWindowsHook(int, HOOKPROC);
  1678.  
  1679.     HHOOK   WINAPI SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hInst hInstance, HTASK hTask);
  1680.     BOOL    WINAPI UnhookWindowsHookEx(HHOOK hHook);
  1681.     LRESULT WINAPI CallNextHookEx(HHOOK hHook, int code, WPARAM wParam, LPARAM lParam);
  1682.     */
  1683.  
  1684.     // ****** Omit Computer-based-training (CBT) support *********
  1685.  
  1686.     /*
  1687.     // HCBT_CREATEWND parameters pointed to by lParam
  1688.     typedef struct tagCBT_CREATEWND
  1689.     {
  1690.         CREATESTRUCT * lpcs;
  1691.         HWND    hwndInsertAfter;
  1692.     } CBT_CREATEWND;
  1693.     typedef CBT_CREATEWND * LPCBT_CREATEWND;
  1694.  
  1695.     // HCBT_ACTIVATE structure pointed to by lParam
  1696.     typedef struct tagCBTACTIVATESTRUCT
  1697.     {
  1698.         BOOL    fMouse;
  1699.         HWND    hWndActive;
  1700.     } CBTACTIVATESTRUCT;
  1701.     */
  1702.  
  1703.     // ****** Omit Hardware hook support
  1704.  
  1705.     /*
  1706.     typedef struct tagHARDWAREHOOKSTRUCT
  1707.     {
  1708.         HWND    hWnd;
  1709.         UINT    wMessage;
  1710.         WPARAM  wParam;
  1711.         LPARAM  lParam;
  1712.     } HARDWAREHOOKSTRUCT;
  1713.     */
  1714.  
  1715.     // ****** Omit Shell support ********
  1716.  
  1717.     // ****** Omit Journalling support **
  1718.  
  1719.     /*
  1720.     // Journalling message structure
  1721.     typedef struct tagEVENTMSG
  1722.     {
  1723.         UINT    message;
  1724.         UINT    paramL;
  1725.         UINT    paramH;
  1726.         DWORD   time;
  1727.     } EVENTMSG;
  1728.     typedef EVENTMSG *PEVENTMSG;
  1729.     typedef EVENTMSG NEAR* NPEVENTMSG;
  1730.     typedef EVENTMSG * LPEVENTMSG;
  1731.  
  1732.     BOOL    WINAPI EnableHardwareInput(BOOL);
  1733.     */
  1734.  
  1735.     // ****** Omit Debugger support *****
  1736.  
  1737.     /*
  1738.     typedef struct tagDEBUGHOOKINFO
  1739.     {
  1740.         HMODULE hModuleHook;
  1741.         LPARAM  reserved;
  1742.         LPARAM  lParam;
  1743.         WPARAM  wParam;
  1744.         int         code;
  1745.     } DEBUGHOOKINFO;
  1746.     typedef DEBUGHOOKINFO * LPDEBUGHOOKINFO;
  1747.  
  1748.     BOOL WINAPI QuerySendMessage(HANDLE h1, HANDLE h2, HANDLE h3, LPMSG lpmsg);
  1749.  
  1750.     BOOL WINAPI LockInput(HANDLE h1, HWND hwndInput, BOOL fLock);
  1751.  
  1752.     LONG WINAPI GetSystemDebugState(void);
  1753.     */
  1754.  
  1755.     // ***** Process support ******
  1756.     const DWORD IGNORE           = 0;
  1757.     const DWORD INFINITE         = 0xFFFFFFFF;
  1758.  
  1759.     // ****** Help support *********
  1760.  
  1761.     [
  1762.     usesgetlasterror,
  1763.     #ifdef UNICODE
  1764.     entry("WinHelpW"),
  1765.     #else
  1766.     entry("WinHelpA"),
  1767.     #endif
  1768.     helpstring("Starts windows help and passes a request for help"),
  1769.     ]
  1770.     BOOL WINAPI WinHelp(HWND hwndMain, LPCTSTR lpszHelp,
  1771.                         UINT usCommand, DWORD ulData);
  1772.  
  1773.     /*
  1774.     typedef struct tagMULTIKEYHELP
  1775.     {
  1776.         UINT    mkSize;
  1777.         BYTE    mkKeylist;
  1778.         BYTE    szKeyphrase[1];
  1779.     } MULTIKEYHELP;
  1780.  
  1781.  
  1782.     typedef struct
  1783.     {
  1784.         int  wStructSize;
  1785.         int  x;
  1786.         int  y;
  1787.         int  dx;
  1788.         int  dy;
  1789.         int  wMax;
  1790.         char rgchMember[2];
  1791.     } HELPWININFO;
  1792.     typedef HELPWININFO NEAR* PHELPWININFO;
  1793.     typedef HELPWININFO * LPHELPWININFO;
  1794.     */
  1795.  
  1796.     // ****** Omit Sound support (obsolete) *******
  1797.  
  1798.     /*
  1799.     int     WINAPI OpenSound(void);
  1800.     void    WINAPI CloseSound(void);
  1801.  
  1802.     int     WINAPI StartSound(void);
  1803.     int     WINAPI StopSound(void);
  1804.  
  1805.     int     WINAPI SetVoiceQueueSize(int, int);
  1806.     int     WINAPI SetVoiceNote(int, int, int, int);
  1807.     int     WINAPI SetVoiceAccent(int, int, int, int, int);
  1808.     int     WINAPI SetVoiceEnvelope(int, int, int);
  1809.     int     WINAPI SetVoiceSound(int, DWORD, int);
  1810.  
  1811.     int     WINAPI SetVoiceThreshold(int, int);
  1812.     int * WINAPI GetThresholdEvent(void);
  1813.     int     WINAPI GetThresholdStatus(void);
  1814.  
  1815.     int     WINAPI SetSoundNoise(int, int);
  1816.  
  1817.  
  1818.     int     WINAPI WaitSoundState(int);
  1819.  
  1820.     // WaitSoundState() constants
  1821.     //define S_QUEUEEMPTY       0
  1822.     //define S_THRESHOLD        1
  1823.     //define S_ALLTHRESHOLD     2
  1824.  
  1825.     int     WINAPI SyncAllVoices(void);
  1826.     int     WINAPI CountVoiceNotes(int);
  1827.  
  1828.     // Accent Modes
  1829.     //define S_NORMAL      0
  1830.     //define S_LEGATO      1
  1831.     //define S_STACCATO    2
  1832.  
  1833.     // SetSoundNoise() Sources
  1834.     //define S_PERIOD512   0    // Freq = N/512 high pitch, less coarse hiss
  1835.     //define S_PERIOD1024  1    // Freq = N/1024
  1836.     //define S_PERIOD2048  2    // Freq = N/2048 low pitch, more coarse hiss
  1837.     //define S_PERIODVOICE 3    // Source is frequency from voice channel (3)
  1838.     //define S_WHITE512   4     // Freq = N/512 high pitch, less coarse hiss
  1839.     //define S_WHITE1024   5    // Freq = N/1024
  1840.     //define S_WHITE2048   6    // Freq = N/2048 low pitch, more coarse hiss
  1841.     //define S_WHITEVOICE  7    // Source is frequency from voice channel (3)
  1842.  
  1843.     // Error return values
  1844.     //define S_SERDVNA    (-1)  // Device not available
  1845.     //define S_SEROFM     (-2)  // Out of memory
  1846.     //define S_SERMACT    (-3)  // Music active
  1847.     //define S_SERQFUL    (-4)  // Queue full
  1848.     //define S_SERBDNT    (-5)  // Invalid note
  1849.     //define S_SERDLN     (-6)  // Invalid note length
  1850.     //define S_SERDCC     (-7)  // Invalid note count
  1851.     //define S_SERDTP     (-8)  // Invalid tempo
  1852.     //define S_SERDVL     (-9)  // Invalid volume
  1853.     //define S_SERDMD     (-10) // Invalid mode
  1854.     //define S_SERDSH     (-11) // Invalid shape
  1855.     //define S_SERDPT     (-12) // Invalid pitch
  1856.     //define S_SERDFQ     (-13) // Invalid frequency
  1857.     //define S_SERDDR     (-14) // Invalid duration
  1858.     //define S_SERDSR     (-15) // Invalid source
  1859.     //define S_SERDST     (-16) // Invalid state
  1860.     */
  1861.  
  1862.     // ****** Comm support *******
  1863.  
  1864.     /*
  1865.     //define NOPARITY       0
  1866.     //define ODDPARITY      1
  1867.     //define EVENPARITY     2
  1868.     //define MARKPARITY     3
  1869.     //define SPACEPARITY        4
  1870.  
  1871.     //define ONESTOPBIT     0
  1872.     //define ONE5STOPBITS       1
  1873.     //define TWOSTOPBITS        2
  1874.  
  1875.     // Error Flags
  1876.     //define CE_RXOVER          0x0001  // Receive Queue overflow
  1877.     //define CE_OVERRUN         0x0002  // Receive Overrun Error
  1878.     //define CE_RXPARITY        0x0004  // Receive Parity Error
  1879.     //define CE_FRAME           0x0008  // Receive Framing error
  1880.     //define CE_BREAK           0x0010  // Break Detected
  1881.     //define CE_TXFULL          0x0100  // TX Queue is full
  1882.     //define CE_PTO             0x0200  // LPTx Timeout
  1883.     //define CE_IOE             0x0400  // LPTx I/O Error
  1884.     //define CE_DNS             0x0800  // LPTx Device not selected
  1885.     //define CE_OOP             0x1000  // LPTx Out-Of-Paper
  1886.     //define CE_MODE            0x8000  // Requested mode unsupported
  1887.  
  1888.     //define IE_BADID           (-1)    // Invalid or unsupported id
  1889.     //define IE_OPEN            (-2)    // Device Already Open
  1890.     //define IE_NOPEN           (-3)    // Device Not Open
  1891.     //define IE_MEMORY          (-4)    // Unable to allocate queues
  1892.     //define IE_DEFAULT         (-5)    // Error in default parameters
  1893.     //define IE_HARDWARE        (-10)   // Hardware Not Present
  1894.     //define IE_BYTESIZE        (-11)   // Illegal Byte Size
  1895.     //define IE_BAUDRATE        (-12)   // Unsupported BaudRate
  1896.  
  1897.     // Events
  1898.     //define EV_RXCHAR          0x0001  // Any Character received
  1899.     //define EV_RXFLAG          0x0002  // Received certain character
  1900.     //define EV_TXEMPTY         0x0004  // Transmitt Queue Empty
  1901.     //define EV_CTS             0x0008  // CTS changed state
  1902.     //define EV_DSR             0x0010  // DSR changed state
  1903.     //define EV_RLSD            0x0020  // RLSD changed state
  1904.     //define EV_BREAK           0x0040  // BREAK received
  1905.     //define EV_ERR             0x0080  // Line status error occurred
  1906.     //define EV_RING            0x0100  // Ring signal detected
  1907.     //define EV_PERR            0x0200  // Printer error occured
  1908.     //define EV_RX80FULL        0x0400  // Receive buffer is 80 percent full
  1909.     //define EV_EVENT1          0x0800  // Provider specific event 1
  1910.     //define EV_EVENT2          0x1000  // Provider specific event 2
  1911.  
  1912.     //define EV_CTSS             0x0400
  1913.     //define EV_DSRS             0x0800
  1914.     //define EV_RLSDS            0x1000
  1915.     //define EV_RingTe           0x2000
  1916.     //define EV_RINGTE      EV_RingTe
  1917.  
  1918.     // Escape Functions
  1919.     //define SETXOFF            1       // Simulate XOFF received
  1920.     //define SETXON             2       // Simulate XON received
  1921.     //define SETRTS             3       // Set RTS high
  1922.     //define CLRRTS             4       // Set RTS low
  1923.     //define SETDTR             5       // Set DTR high
  1924.     //define CLRDTR             6       // Set DTR low
  1925.     //define RESETDEV           7       // Reset device if possible
  1926.     //define SETBREAK           8       // Set the device break line.
  1927.     //define CLRBREAK           9       // Clear the device break line.
  1928.  
  1929.     //define LPTx               0x80    // Set if ID is for LPT device
  1930.  
  1931.  
  1932.     // new escape functions
  1933.     //define GETMAXLPT           8
  1934.     //define GETMAXCOM           9
  1935.     //define GETBASEIRQ          10
  1936.  
  1937.     // Comm Baud Rate indices
  1938.     //define CBR_110         0xFF10
  1939.     //define CBR_300      0xFF11
  1940.     //define CBR_600      0xFF12
  1941.     //define CBR_1200     0xFF13
  1942.     //define CBR_2400     0xFF14
  1943.     //define CBR_4800     0xFF15
  1944.     //define CBR_9600     0xFF16
  1945.     //define CBR_14400    0xFF17
  1946.     //define CBR_19200    0xFF18
  1947.     //define CBR_38400    0xFF1B
  1948.     //define CBR_56000    0xFF1F
  1949.     //define CBR_128000   0xFF23
  1950.     //define CBR_256000   0xFF27
  1951.  
  1952.     // notifications passed in low word of lParam on WM_COMMNOTIFY messages
  1953.     //define CN_RECEIVE  0x0001
  1954.     //define CN_TRANSMIT 0x0002
  1955.     //define CN_EVENT    0x0004
  1956.  
  1957.     //
  1958.     // PURGE function flags.
  1959.     //
  1960.     //define PURGE_TXABORT      0x0001  // Kill the pending/current writes to the comm port.
  1961.     //define PURGE_RXABORT      0x0002  // Kill the pending/current reads to the comm port.
  1962.     //define PURGE_TXCLEAR      0x0004  // Kill the transmit queue if there.
  1963.     //define PURGE_RXCLEAR      0x0008  // Kill the typeahead buffer if there.
  1964.  
  1965.     //
  1966.     // Modem Status Flags
  1967.     //
  1968.     //define MS_CTS_ON          ((DWORD)0x0010)
  1969.     //define MS_DSR_ON          ((DWORD)0x0020)
  1970.     //define MS_RING_ON         ((DWORD)0x0040)
  1971.     //define MS_RLSD_ON         ((DWORD)0x0080)
  1972.  
  1973.     //
  1974.     // Serial provider type.
  1975.     //
  1976.  
  1977.     //define SP_SERIALCOMM   ((DWORD)0x00000001)
  1978.  
  1979.     //
  1980.     // Provider SubTypes
  1981.     //
  1982.  
  1983.     //define PST_UNSPECIFIED     ((DWORD)0x00000000)
  1984.     //define PST_RS232           ((DWORD)0x00000001)
  1985.     //define PST_PARALLELPORT    ((DWORD)0x00000002)
  1986.     //define PST_RS422           ((DWORD)0x00000003)
  1987.     //define PST_RS423           ((DWORD)0x00000004)
  1988.     //define PST_RS449           ((DWORD)0x00000005)
  1989.     //define PST_FAX             ((DWORD)0x00000021)
  1990.     //define PST_SCANNER         ((DWORD)0x00000022)
  1991.     //define PST_NETWORK_BRIDGE  ((DWORD)0x00000100)
  1992.     //define PST_LAT             ((DWORD)0x00000101)
  1993.     //define PST_TCPIP_TELNET    ((DWORD)0x00000102)
  1994.     //define PST_X25             ((DWORD)0x00000103)
  1995.  
  1996.  
  1997.     //
  1998.     // Provider capabilities flags.
  1999.     //
  2000.  
  2001.     //define PCF_DTRDSR       ((DWORD)0x0001)
  2002.     //define PCF_RTSCTS       ((DWORD)0x0002)
  2003.     //define PCF_RLSD         ((DWORD)0x0004)
  2004.     //define PCF_PARITY_CHECK  ((DWORD)0x0008)
  2005.     //define PCF_XONXOFF      ((DWORD)0x0010)
  2006.     //define PCF_SETXCHAR     ((DWORD)0x0020)
  2007.     //define PCF_TOTALTIMEOUTS ((DWORD)0x0040)
  2008.     //define PCF_INTTIMEOUTS   ((DWORD)0x0080)
  2009.     //define PCF_SPECIALCHARS  ((DWORD)0x0100)
  2010.     //define PCF_16BITMODE    ((DWORD)0x0200)
  2011.  
  2012.     //
  2013.     // Comm provider settable parameters.
  2014.     //
  2015.  
  2016.     //define SP_PARITY        ((DWORD)0x0001)
  2017.     //define SP_BAUD          ((DWORD)0x0002)
  2018.     //define SP_DATABITS      ((DWORD)0x0004)
  2019.     //define SP_STOPBITS      ((DWORD)0x0008)
  2020.     //define SP_HANDSHAKING   ((DWORD)0x0010)
  2021.     //define SP_PARITY_CHECK   ((DWORD)0x0020)
  2022.     //define SP_RLSD          ((DWORD)0x0040)
  2023.  
  2024.     //
  2025.     // Settable baud rates in the provider.
  2026.     //
  2027.  
  2028.     //define BAUD_075         ((DWORD)0x00000001)
  2029.     //define BAUD_110         ((DWORD)0x00000002)
  2030.     //define BAUD_134_5       ((DWORD)0x00000004)
  2031.     //define BAUD_150         ((DWORD)0x00000008)
  2032.     //define BAUD_300         ((DWORD)0x00000010)
  2033.     //define BAUD_600         ((DWORD)0x00000020)
  2034.     //define BAUD_1200        ((DWORD)0x00000040)
  2035.     //define BAUD_1800        ((DWORD)0x00000080)
  2036.     //define BAUD_2400        ((DWORD)0x00000100)
  2037.     //define BAUD_4800        ((DWORD)0x00000200)
  2038.     //define BAUD_7200        ((DWORD)0x00000400)
  2039.     //define BAUD_9600        ((DWORD)0x00000800)
  2040.     //define BAUD_14400       ((DWORD)0x00001000)
  2041.     //define BAUD_19200       ((DWORD)0x00002000)
  2042.     //define BAUD_38400       ((DWORD)0x00004000)
  2043.     //define BAUD_56K         ((DWORD)0x00008000)
  2044.     //define BAUD_128K        ((DWORD)0x00010000)
  2045.     //define BAUD_115200      ((DWORD)0x00020000)
  2046.     //define BAUD_57600       ((DWORD)0x00040000)
  2047.     //define BAUD_USER        ((DWORD)0x10000000)
  2048.  
  2049.     //
  2050.     // Settable Data Bits
  2051.     //
  2052.  
  2053.     //define DATABITS_5       ((WORD)0x0001)
  2054.     //define DATABITS_6       ((WORD)0x0002)
  2055.     //define DATABITS_7       ((WORD)0x0004)
  2056.     //define DATABITS_8       ((WORD)0x0008)
  2057.     //define DATABITS_16      ((WORD)0x0010)
  2058.     //define DATABITS_16X     ((WORD)0x0020)
  2059.  
  2060.     //
  2061.     // Settable Stop and Parity bits.
  2062.     //
  2063.  
  2064.     //define STOPBITS_10      ((WORD)0x0001)
  2065.     //define STOPBITS_15      ((WORD)0x0002)
  2066.     //define STOPBITS_20      ((WORD)0x0004)
  2067.     //define PARITY_NONE      ((WORD)0x0100)
  2068.     //define PARITY_ODD       ((WORD)0x0200)
  2069.     //define PARITY_EVEN      ((WORD)0x0400)
  2070.     //define PARITY_MARK      ((WORD)0x0800)
  2071.     //define PARITY_SPACE     ((WORD)0x1000)
  2072.  
  2073.     typedef struct _DCB {
  2074.         DWORD DCBlength;      // sizeof(DCB)
  2075.         DWORD BaudRate;       // Baudrate at which running
  2076.         DWORD fBinary: 1;     // Binary Mode (skip EOF check)
  2077.         DWORD fParity: 1;     // Enable parity checking
  2078.         DWORD fOutxCtsFlow:1; // CTS handshaking on output
  2079.         DWORD fOutxDsrFlow:1; // DSR handshaking on output
  2080.         DWORD fDtrControl:2;  // DTR Flow control
  2081.         DWORD fDsrSensitivity:1; // DSR Sensitivity
  2082.         DWORD fTXContinueOnXoff: 1; // Continue TX when Xoff sent
  2083.         DWORD fOutX: 1;       // Enable output X-ON/X-OFF
  2084.         DWORD fInX: 1;        // Enable input X-ON/X-OFF
  2085.         DWORD fErrorChar: 1;  // Enable Err Replacement
  2086.         DWORD fNull: 1;       // Enable Null stripping
  2087.         DWORD fRtsControl:2;  // Rts Flow control
  2088.         DWORD fAbortOnError:1; // Abort all reads and writes on Error
  2089.         DWORD fDummy2:17;     // Reserved
  2090.         WORD wReserved;       // Not currently used
  2091.         WORD XonLim;          // Transmit X-ON threshold
  2092.         WORD XoffLim;         // Transmit X-OFF threshold
  2093.         BYTE ByteSize;        // Number of bits/byte, 4-8
  2094.         BYTE Parity;          // 0-4=None,Odd,Even,Mark,Space
  2095.         BYTE StopBits;        // 0,1,2 = 1, 1.5, 2
  2096.         char XonChar;         // Tx and Rx X-ON character
  2097.         char XoffChar;        // Tx and Rx X-OFF character
  2098.         char ErrorChar;       // Error replacement char
  2099.         char EofChar;         // End of Input character
  2100.         char EvtChar;         // Received Event character
  2101.         WORD wReserved1;      // Fill for now.
  2102.     } DCB, *LPDCB;
  2103.  
  2104.     typedef struct tagCOMSTAT
  2105.     {
  2106.         BYTE status;
  2107.         UINT cbInQue;
  2108.         UINT cbOutQue;
  2109.     } COMSTAT;
  2110.  
  2111.     typedef struct _COMMTIMEOUTS {
  2112.         DWORD ReadIntervalTimeout;          // Maximum time between read chars.
  2113.         DWORD ReadTotalTimeoutMultiplier;   // Multiplier of characters.
  2114.         DWORD ReadTotalTimeoutConstant;     // Constant in milliseconds.
  2115.         DWORD WriteTotalTimeoutMultiplier;  // Multiplier of characters.
  2116.         DWORD WriteTotalTimeoutConstant;    // Constant in milliseconds.
  2117.     } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
  2118.  
  2119.     typedef struct _COMMCONFIG {
  2120.         DWORD dwSize;
  2121.         WORD wVersion;
  2122.         WORD wReserved;
  2123.         DCB dcb;
  2124.         DWORD dwProviderSubType;
  2125.         DWORD dwProviderOffset;
  2126.         DWORD dwProviderSize;
  2127.         WCHAR wcProviderData[1];
  2128.     } COMMCONFIG,*LPCOMMCONFIG;
  2129.  
  2130.     //define CSTF_CTSHOLD    0x01
  2131.     //define CSTF_DSRHOLD    0x02
  2132.     //define CSTF_RLSDHOLD   0x04
  2133.     //define CSTF_XOFFHOLD   0x08
  2134.     //define CSTF_XOFFSENT   0x10
  2135.     //define CSTF_EOF        0x20
  2136.     //define CSTF_TXIM       0x40
  2137.  
  2138.     // NOTE: This structure declaration is not ANSI compatible!
  2139.     typedef struct tagCOMSTAT
  2140.     {
  2141.         BYTE fCtsHold  :1;
  2142.         BYTE fDsrHold  :1;
  2143.         BYTE fRlsdHold :1;
  2144.         BYTE fXoffHold :1;
  2145.         BYTE fXoffSent :1;
  2146.         BYTE fEof      :1;
  2147.         BYTE fTxim     :1;
  2148.         UINT cbInQue;
  2149.         UINT cbOutQue;
  2150.     } COMSTAT;
  2151.  
  2152.     typedef struct _COMMPROP {
  2153.         WORD wPacketLength;
  2154.         WORD wPacketVersion;
  2155.         DWORD dwServiceMask;
  2156.         DWORD dwReserved1;
  2157.         DWORD dwMaxTxQueue;
  2158.         DWORD dwMaxRxQueue;
  2159.         DWORD dwMaxBaud;
  2160.         DWORD dwProvSubType;
  2161.         DWORD dwProvCapabilities;
  2162.         DWORD dwSettableParams;
  2163.         DWORD dwSettableBaud;
  2164.         WORD wSettableData;
  2165.         WORD wSettableStopParity;
  2166.         DWORD dwCurrentTxQueue;
  2167.         DWORD dwCurrentRxQueue;
  2168.         DWORD dwProvSpec1;
  2169.         DWORD dwProvSpec2;
  2170.         WCHAR wcProvChar[1];
  2171.     } COMMPROP,*LPCOMMPROP;
  2172.  
  2173.     //
  2174.     // DTR Control Flow Values.
  2175.     //
  2176.     //define DTR_CONTROL_DISABLE    0x00
  2177.     //define DTR_CONTROL_ENABLE    0x01
  2178.     //define DTR_CONTROL_HANDSHAKE  0x02
  2179.  
  2180.     //
  2181.     // RTS Control Flow Values
  2182.     //
  2183.     //define RTS_CONTROL_DISABLE    0x00
  2184.     //define RTS_CONTROL_ENABLE    0x01
  2185.     //define RTS_CONTROL_HANDSHAKE  0x02
  2186.     //define RTS_CONTROL_TOGGLE    0x03
  2187.     */
  2188.  
  2189.     /*
  2190.     BOOL WINAPI ClearCommError(
  2191.         HANDLE hFile,
  2192.         LPDWORD lpErrors,
  2193.         LPCOMSTAT lpStat
  2194.         );
  2195.  
  2196.     BOOL WINAPI SetupComm(
  2197.         HANDLE hFile,
  2198.         DWORD dwInQueue,
  2199.         DWORD dwOutQueue
  2200.         );
  2201.  
  2202.     BOOL WINAPI GetCommConfig(
  2203.         HANDLE hCommDev,
  2204.         LPCOMMCONFIG lpCC,
  2205.         LPDWORD lpdwSize
  2206.         );
  2207.  
  2208.     BOOL WINAPI GetCommMask(
  2209.         HANDLE hFile,
  2210.         LPDWORD lpEvtMask
  2211.         );
  2212.  
  2213.     BOOL WINAPI GetCommProperties(
  2214.         HANDLE hFile,
  2215.         LPCOMMPROP lpCommProp
  2216.         );
  2217.  
  2218.     BOOL WINAPI GetCommModemStatus(
  2219.         HANDLE hFile,
  2220.         LPDWORD lpModemStat
  2221.         );
  2222.  
  2223.     BOOL WINAPI GetCommTimeouts(
  2224.         HANDLE hFile,
  2225.         LPCOMMTIMEOUTS lpCommTimeouts
  2226.         );
  2227.  
  2228.     BOOL WINAPI PurgeComm(
  2229.         HANDLE hFile,
  2230.         DWORD dwFlags
  2231.         );
  2232.  
  2233.     BOOL WINAPI SetCommConfig(
  2234.         HANDLE hCommDev,
  2235.         LPCOMMCONFIG lpCC,
  2236.         DWORD dwSize
  2237.         );
  2238.  
  2239.     BOOL WINAPI SetCommMask(
  2240.         HANDLE hFile,
  2241.         DWORD dwEvtMask
  2242.         );
  2243.  
  2244.     BOOL WINAPI SetCommTimeouts(
  2245.         HANDLE hFile,
  2246.         LPCOMMTIMEOUTS lpCommTimeouts
  2247.         );
  2248.  
  2249.     BOOL WINAPI WaitCommEvent(
  2250.         HANDLE hFile,
  2251.         LPDWORD lpEvtMask,
  2252.         LPOVERLAPPED lpOverlapped
  2253.         );
  2254.  
  2255.     BOOL WINAPI BuildCommDCBA(
  2256.         LPCTSTR lpDef,
  2257.         LPDCB lpDCB
  2258.         );
  2259.  
  2260.     BOOL WINAPI BuildCommDCBAndTimeoutsA(
  2261.         LPCTSTR lpDef,
  2262.         LPDCB lpDCB,
  2263.         LPCOMMTIMEOUTS lpCommTimeouts
  2264.         );
  2265.  
  2266.     BOOL WINAPI CommConfigDialogA(
  2267.         LPCTSTR lpszName,
  2268.         HWND hWnd,
  2269.         LPCOMMCONFIG lpCC
  2270.         );
  2271.  
  2272.     BOOL WINAPI GetDefaultCommConfigA(
  2273.         LPCTSTR lpszName,
  2274.         LPCOMMCONFIG lpCC,
  2275.         LPDWORD lpdwSize
  2276.         );
  2277.  
  2278.     BOOL WINAPI SetDefaultCommConfigA(
  2279.         LPCTSTR lpszName,
  2280.         LPCOMMCONFIG lpCC,
  2281.         DWORD dwSize
  2282.         );
  2283.  
  2284.     int     WINAPI OpenComm(LPCTSTR, UINT, UINT);
  2285.     int     WINAPI CloseComm(int);
  2286.  
  2287.     int     WINAPI ReadComm(int, void *, int);
  2288.     int     WINAPI WriteComm(int, const void *, int);
  2289.     int     WINAPI UngetCommChar(int, char);
  2290.     int     WINAPI FlushComm(int, int);
  2291.     int     WINAPI TransmitCommChar(int, char);
  2292.  
  2293.     int     WINAPI SetCommState(const DCB *);
  2294.     int     WINAPI GetCommState(int, DCB *);
  2295.     int     WINAPI GetCommError(int, COMSTAT * );
  2296.  
  2297.     int     WINAPI SetCommBreak(int);
  2298.     int     WINAPI ClearCommBreak(int);
  2299.  
  2300.     UINT * WINAPI SetCommEventMask(int, UINT);
  2301.     UINT    WINAPI GetCommEventMask(int, int);
  2302.  
  2303.     LONG    WINAPI EscapeCommFunction(int, int);
  2304.  
  2305.     BOOL    WINAPI EnableCommNotification(int, HWND hwnd, int, int);
  2306.     */
  2307.  
  2308.     // ****** Omit String formatting support *********
  2309.  
  2310.     /*
  2311.     int     WINAPI wvsprintf(LPTSTR lpszOut, LPCTSTR lpszFmt, const void * lpParams);
  2312.  
  2313.     int FAR CDECL wsprintf(LPTSTR lpszOut, LPCTSTR lpszFmt, ...);
  2314.     */
  2315.  
  2316.     // ****** Driver support *******
  2317.  
  2318.     /*
  2319.     DECLARE_HANDLE(HDRVR);
  2320.  
  2321.     typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM);
  2322.  
  2323.     // Driver messages
  2324.     //define DRV_LOAD       0x0001
  2325.     //define DRV_ENABLE     0x0002
  2326.     //define DRV_OPEN       0x0003
  2327.     //define DRV_CLOSE      0x0004
  2328.     //define DRV_DISABLE        0x0005
  2329.     //define DRV_FREE       0x0006
  2330.     //define DRV_CONFIGURE      0x0007
  2331.     //define DRV_QUERYCONFIGURE 0x0008
  2332.     //define DRV_INSTALL        0x0009
  2333.     //define DRV_REMOVE     0x000A
  2334.     //define DRV_EXITSESSION         0x000B
  2335.     //define DRV_EXITAPPLICATION     0x000C
  2336.     //define DRV_POWER      0x000F
  2337.  
  2338.     //define DRV_RESERVED       0x0800
  2339.     //define DRV_USER       0x4000
  2340.  
  2341.     // LPARAM of DRV_CONFIGURE message
  2342.     typedef struct tagDRVCONFIGINFO
  2343.     {
  2344.         DWORD   dwDCISize;
  2345.         LPCTSTR  lpszDCISectionName;
  2346.         LPCTSTR  lpszDCIAliasName;
  2347.     } DRVCONFIGINFO;
  2348.     typedef DRVCONFIGINFO NEAR* PDRVCONFIGINFO;
  2349.     typedef DRVCONFIGINFO * LPDRVCONFIGINFO;
  2350.  
  2351.     // Supported return values for DRV_CONFIGURE message
  2352.     //define DRVCNF_CANCEL      0x0000
  2353.     //define DRVCNF_OK      0x0001
  2354.     //define DRVCNF_RESTART     0x0002
  2355.  
  2356.     // Supported lParam1 of DRV_EXITAPPLICATION notification
  2357.     //define DRVEA_NORMALEXIT            0x0001
  2358.     //define DRVEA_ABNORMALEXIT          0x0002
  2359.  
  2360.     LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, UINT message, LPARAM lParam1, LPARAM lParam2);
  2361.  
  2362.     HDRVR   WINAPI OpenDriver(LPCTSTR szDriverName, LPCTSTR szSectionName, LPARAM lParam2);
  2363.     LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2);
  2364.  
  2365.     HINSTANCE WINAPI GetDriverModuleHandle(HDRVR hDriver);
  2366.  
  2367.     HDRVR   WINAPI GetNextDriver(HDRVR, DWORD);
  2368.  
  2369.     // GetNextDriver flags
  2370.     //define GND_FIRSTINSTANCEONLY  0x00000001
  2371.  
  2372.     //define GND_FORWARD             0x00000000
  2373.     //define GND_REVERSE        0x00000002
  2374.  
  2375.     typedef struct tagDRIVERINFOSTRUCT
  2376.     {
  2377.         UINT    length;
  2378.         HDRVR   hDriver;
  2379.         HINSTANCE hModule;
  2380.         char    szAliasName[128];
  2381.     } DRIVERINFOSTRUCT;
  2382.     typedef DRIVERINFOSTRUCT * LPDRIVERINFOSTRUCT;
  2383.  
  2384.     BOOL    WINAPI GetDriverInfo(HDRVR, DRIVERINFOSTRUCT *);
  2385.     */
  2386.  
  2387.     [
  2388.     usesgetlasterror,
  2389.     entry("DrawEdge"),
  2390.     helpstring("Draws a 3-D edge on a rectangle according to the given edge and border flags"),
  2391.     ]
  2392.     BOOL WINAPI DrawEdge(HDC hdc, RECT * lprc,
  2393.                          UINT edge, UINT grfFlags);
  2394.  
  2395.     [
  2396.     usesgetlasterror,
  2397.     entry("DrawFrameControl"),
  2398.     helpstring("Draws a control frame of a specified type and style"),
  2399.     ]
  2400.     BOOL WINAPI DrawFrameControl(HDC hdc, RECT * lprc,
  2401.                                  UINT uType, UINT uState);
  2402.  
  2403.     [
  2404.     usesgetlasterror,
  2405.     entry("DrawAnimatedRects"),
  2406.     helpstring("Draws a wire-frame rectangle and animates it to indicate opening an icon or minimizing or maximizing a window"),
  2407.     ]
  2408.     BOOL WINAPI DrawAnimatedRects(HWND hwnd, int idAni,
  2409.                                   RECT * lprcFrom,
  2410.                                   RECT * lprcTo);
  2411.  
  2412.     [
  2413.     usesgetlasterror,
  2414.     entry("DrawCaption"),
  2415.     helpstring("Draws a window caption"),
  2416.     ]
  2417.     BOOL WINAPI DrawCaption(HWND hwnd, HDC hdc, RECT * lprc, UINT);
  2418.  
  2419.     // ****** Color support *******
  2420.  
  2421.     [
  2422.     usesgetlasterror,
  2423.     entry("GetSysColor"),
  2424.     helpstring("Returns color of the specified display element"),
  2425.     ]
  2426.     COLORREF WINAPI GetSysColor(int nIndex);
  2427.  
  2428. //@B SetSysColor
  2429.     [
  2430.     usesgetlasterror,
  2431.     entry("SetSysColor"),
  2432.     helpstring("Sets colors of the display element in the lpaElements array to the colors in the lpaRgbValues array"),
  2433.     ]
  2434.     void    WINAPI SetSysColors(int cElements,
  2435.                                 int * lpaElements,
  2436.                                 COLORREF * lpaRgbValues);
  2437. //@E SetSysColor
  2438.  
  2439.     // ****** Exit Windows support *******
  2440.  
  2441.     [
  2442.     usesgetlasterror,
  2443.     entry("ExitWindows"),
  2444.     helpstring("Exit from Windows, restarting or rebooting"),
  2445.     ]
  2446.     BOOL    WINAPI ExitWindows(DWORD dwReturnCode, UINT reserved);
  2447.  
  2448.  
  2449.     [
  2450.     usesgetlasterror,
  2451.     entry("ExitWindowsEx"),
  2452.     helpstring("Exit from Windows, restarting or rebooting"),
  2453.     ]
  2454.     BOOL    WINAPI ExitWindowsEx(UINT uFlags, DWORD dwReserved);
  2455.  
  2456.     [
  2457.     usesgetlasterror,
  2458.     #ifdef UNICODE
  2459.     entry("ExitWindowsExecW"),
  2460.     #else
  2461.     entry("ExitWindowsExecA"),
  2462.     #endif
  2463.     helpstring("Exit from Windows, run a program, and restart"),
  2464.     ]
  2465.     BOOL    WINAPI ExitWindowsExec(
  2466.                         LPCTSTR lpszExe, LPCTSTR lpszParams);
  2467.  
  2468.     // ******* International & Char Translation Support *******
  2469.  
  2470.     /* Omitted
  2471.     void    WINAPI AnsiToOem(const char _huge*, char _huge*);
  2472.     void    WINAPI OemToAnsi(const char _huge*, char _huge*);
  2473.     void    WINAPI AnsiToOemBuff(LPCTSTR, LPTSTR, UINT);
  2474.     void    WINAPI OemToAnsiBuff(LPCTSTR, LPTSTR, UINT);
  2475.     LPTSTR   WINAPI AnsiNext(LPCTSTR);
  2476.     LPTSTR   WINAPI AnsiPrev(LPCTSTR, LPCTSTR);
  2477.     LPTSTR   WINAPI AnsiUpper(LPTSTR);
  2478.     LPTSTR   WINAPI AnsiLower(LPTSTR);
  2479.     UINT    WINAPI AnsiUpperBuff(LPTSTR, UINT);
  2480.     UINT    WINAPI AnsiLowerBuff(LPTSTR, UINT);
  2481.     BOOL    WINAPI IsCharAlpha(char);
  2482.     BOOL    WINAPI IsCharAlphaNumeric(char);
  2483.     BOOL    WINAPI IsCharUpper(char);
  2484.     BOOL    WINAPI IsCharLower(char);
  2485.     BOOL    WINAPI IsDBCSLeadByte(BYTE);
  2486.     */
  2487.  
  2488. }   // End module User
  2489.  
  2490.  
  2491. [
  2492. #ifdef UNICODE
  2493. uuid(64675047-3A82-101B-8181-00AA003743D3),
  2494. #else
  2495. uuid(64674047-3A82-101B-8181-00AA003743D3),
  2496. #endif
  2497. helpstring("Windows User Constants"),
  2498. dllname("NOSUCH.DLL")
  2499. ]
  2500. module UserConst {
  2501.  
  2502.     // GetSystemMetrics() codes
  2503.     const int SM_CXSCREEN     = 0;
  2504.     const int SM_CYSCREEN     = 1;
  2505.     const int SM_CXVSCROLL        = 2;
  2506.     const int SM_CYHSCROLL        = 3;
  2507.     const int SM_CYCAPTION        = 4;
  2508.     const int SM_CXBORDER     = 5;
  2509.     const int SM_CYBORDER     = 6;
  2510.     const int SM_CXDLGFRAME   = 7;
  2511.     const int SM_CYDLGFRAME   = 8;
  2512.     const int SM_CYVTHUMB     = 9;
  2513.     const int SM_CXHTHUMB     = 10;
  2514.     const int SM_CXICON       = 11;
  2515.     const int SM_CYICON       = 12;
  2516.     const int SM_CXCURSOR     = 13;
  2517.     const int SM_CYCURSOR     = 14;
  2518.     const int SM_CYMENU           = 15;
  2519.     const int SM_CXFULLSCREEN = 16;
  2520.     const int SM_CYFULLSCREEN = 17;
  2521.     const int SM_CYKANJIWINDOW    = 18;
  2522.     const int SM_MOUSEPRESENT = 19;
  2523.     const int SM_CYVSCROLL        = 20;
  2524.     const int SM_CXHSCROLL        = 21;
  2525.     const int SM_DEBUG            = 22;
  2526.     const int SM_SWAPBUTTON   = 23;
  2527.     const int SM_RESERVED1        = 24;
  2528.     const int SM_RESERVED2        = 25;
  2529.     const int SM_RESERVED3        = 26;
  2530.     const int SM_RESERVED4        = 27;
  2531.     const int SM_CXMIN            = 28;
  2532.     const int SM_CYMIN            = 29;
  2533.     const int SM_CXSIZE           = 30;
  2534.     const int SM_CYSIZE           = 31;
  2535.     const int SM_CXFRAME      = 32;
  2536.     const int SM_CYFRAME      = 33;
  2537.     const int SM_CXMINTRACK   = 34;
  2538.     const int SM_CYMINTRACK   = 35;
  2539.  
  2540.     const int SM_CXDOUBLECLK  = 36;
  2541.     const int SM_CYDOUBLECLK  = 37;
  2542.     const int SM_CXICONSPACING    = 38;
  2543.     const int SM_CYICONSPACING    = 39;
  2544.     const int SM_MENUDROPALIGNMENT = 40;
  2545.     const int SM_PENWINDOWS       = 41;
  2546.     const int SM_DBCSENABLED  = 42;
  2547.  
  2548.     const int SM_CMETRICS     = 43;
  2549.  
  2550.     // GetSysColor/SetSysColors
  2551.     const int COLOR_SCROLLBAR             = 0;
  2552.     const int COLOR_BACKGROUND            = 1;
  2553.     const int COLOR_ACTIVECAPTION         = 2;
  2554.     const int COLOR_INACTIVECAPTION       = 3;
  2555.     const int COLOR_MENU                  = 4;
  2556.     const int COLOR_WINDOW                = 5;
  2557.     const int COLOR_WINDOWFRAME           = 6;
  2558.     const int COLOR_MENUTEXT              = 7;
  2559.     const int COLOR_WINDOWTEXT            = 8;
  2560.     const int COLOR_CAPTIONTEXT           = 9;
  2561.     const int COLOR_ACTIVEBORDER          = 10;
  2562.     const int COLOR_INACTIVEBORDER        = 11;
  2563.     const int COLOR_APPWORKSPACE          = 12;
  2564.     const int COLOR_HIGHLIGHT             = 13;
  2565.     const int COLOR_HIGHLIGHTTEXT         = 14;
  2566.     const int COLOR_BTNFACE               = 15;
  2567.     const int COLOR_BTNSHADOW             = 16;
  2568.     const int COLOR_GRAYTEXT              = 17;
  2569.     const int COLOR_BTNTEXT               = 18;
  2570.     const int COLOR_INACTIVECAPTIONTEXT   = 19;
  2571.     const int COLOR_BTNHIGHLIGHT          = 20;
  2572.  
  2573.     const int COLOR_3DDKSHADOW            = 21;
  2574.     const int COLOR_3DLIGHT               = 22;
  2575.     const int COLOR_INFOTEXT              = 23;
  2576.     const int COLOR_INFOBK                = 24;
  2577.  
  2578.     const int COLOR_DESKTOP               = 1;  // COLOR_BACKGROUND
  2579.     const int COLOR_3DFACE                = 15; // COLOR_BTNFACE
  2580.     const int COLOR_3DSHADOW              = 16; // COLOR_BTNSHADOW
  2581.     const int COLOR_3DHIGHLIGHT           = 20; // COLOR_BTNHIGHLIGHT
  2582.     const int COLOR_3DHILIGHT             = 20; // COLOR_BTNHIGHLIGHT
  2583.     const int COLOR_BTNHILIGHT            = 20; // COLOR_BTNHIGHLIGHT
  2584.  
  2585.     const int SPI_GETBEEP                 = 1;
  2586.     const int SPI_SETBEEP                 = 2;
  2587.     const int SPI_GETMOUSE                = 3;
  2588.     const int SPI_SETMOUSE                = 4;
  2589.     const int SPI_GETBORDER               = 5;
  2590.     const int SPI_SETBORDER               = 6;
  2591.     const int SPI_GETKEYBOARDSPEED        = 10;
  2592.     const int SPI_SETKEYBOARDSPEED        = 11;
  2593.     const int SPI_LANGDRIVER              = 12;
  2594.     const int SPI_ICONHORIZONTALSPACING   = 13;
  2595.     const int SPI_GETSCREENSAVETIMEOUT    = 14;
  2596.     const int SPI_SETSCREENSAVETIMEOUT    = 15;
  2597.     const int SPI_GETSCREENSAVEACTIVE     = 16;
  2598.     const int SPI_SETSCREENSAVEACTIVE     = 17;
  2599.     const int SPI_GETGRIDGRANULARITY      = 18;
  2600.     const int SPI_SETGRIDGRANULARITY      = 19;
  2601.     const int SPI_SETDESKWALLPAPER        = 20;
  2602.     const int SPI_SETDESKPATTERN          = 21;
  2603.     const int SPI_GETKEYBOARDDELAY        = 22;
  2604.     const int SPI_SETKEYBOARDDELAY        = 23;
  2605.     const int SPI_ICONVERTICALSPACING     = 24;
  2606.     const int SPI_GETICONTITLEWRAP        = 25;
  2607.     const int SPI_SETICONTITLEWRAP        = 26;
  2608.     const int SPI_GETMENUDROPALIGNMENT    = 27;
  2609.     const int SPI_SETMENUDROPALIGNMENT    = 28;
  2610.     const int SPI_SETDOUBLECLKWIDTH       = 29;
  2611.     const int SPI_SETDOUBLECLKHEIGHT      = 30;
  2612.     const int SPI_GETICONTITLELOGFONT     = 31;
  2613.     const int SPI_SETDOUBLECLICKTIME      = 32;
  2614.     const int SPI_SETMOUSEBUTTONSWAP      = 33;
  2615.     const int SPI_SETICONTITLELOGFONT     = 34;
  2616.     const int SPI_GETFASTTASKSWITCH       = 35;
  2617.     const int SPI_SETFASTTASKSWITCH       = 36;
  2618.  
  2619.     // SystemParametersInfo flags
  2620.     const int SPIF_UPDATEINIFILE       = 0x0001;
  2621.     const int SPIF_SENDWININICHANGE    = 0x0002;
  2622.  
  2623.     // Scroll bar selection constants
  2624.     const int SB_HORZ         = 0;
  2625.     const int SB_VERT         = 1;
  2626.     const int SB_CTL          = 2;
  2627.     const int SB_BOTH         = 3;
  2628.  
  2629.     // EnableScrollBar() flags
  2630.     const int ESB_ENABLE_BOTH      = 0x0000;
  2631.     const int ESB_DISABLE_BOTH     = 0x0003;
  2632.  
  2633.     const int ESB_DISABLE_LEFT     = 0x0001;
  2634.     const int ESB_DISABLE_RIGHT    = 0x0002;
  2635.  
  2636.     const int ESB_DISABLE_UP       = 0x0001;
  2637.     const int ESB_DISABLE_DOWN     = 0x0002;
  2638.  
  2639.     const int ESB_DISABLE_LTUP     = 0x0001;
  2640.     const int ESB_DISABLE_RTDN     = 0x0002;
  2641.  
  2642.     // Window field offsets for GetWindowLong() and GetWindowWord()
  2643.     [ helpstring("Window long: Window proc") ]
  2644.     const int GWL_WNDPROC       = -4;
  2645.     [ helpstring("Window long: Style") ]
  2646.     const int GWL_STYLE         = -16;
  2647.     [ helpstring("Window long: Extended style") ]
  2648.     const int GWL_EXSTYLE       = -20;
  2649.     [ helpstring("Window data: Instance handle") ]
  2650.     const int GWD_HINSTANCE     = -6;
  2651.     [ helpstring("Window data: Window parent") ]
  2652.     const int GWD_HWNDPARENT    = -8;
  2653.     [ helpstring("Window data: ID") ]
  2654.     const int GWD_ID            = -12;
  2655.     [ helpstring("Window long: Instance handle") ]
  2656.     const int GWL_HINSTANCE     = -6;
  2657.     [ helpstring("Window long: Window parent") ]
  2658.     const int GWL_HWNDPARENT    = -8;
  2659.     [ helpstring("Window long: ID") ]
  2660.     const int GWL_ID            = -12;
  2661.     [ helpstring("Window long: User data") ]
  2662.     const int GWL_USERDATA      = -21;
  2663.  
  2664.     // Class field offsets for GetClassLong() and GetClassWord()
  2665.     [ helpstring("Class long: Menu name") ]
  2666.     const int GCL_MENUNAME      = -8;
  2667.     [ helpstring("Class long: Window proc") ]
  2668.     const int GCL_WNDPROC       = -24;
  2669.     [ helpstring("Class word: Atom") ]
  2670.     const int GCW_ATOM          = -32;
  2671.     [ helpstring("Class data: Background brush handle") ]
  2672.     const int GCD_HBRBACKGROUND = -10;
  2673.     [ helpstring("Class data: Cursor handle") ]
  2674.     const int GCD_HCURSOR       = -12;
  2675.     [ helpstring("Class data: Icon handle") ]
  2676.     const int GCD_HICON         = -14;
  2677.     [ helpstring("Class data: Module handle") ]
  2678.     const int GCD_HMODULE       = -16;
  2679.     [ helpstring("Class data: Window extra byte count") ]
  2680.     const int GCD_CBWNDEXTRA    = -18;
  2681.     [ helpstring("Class data: Class extra byte count") ]
  2682.     const int GCD_CBCLSEXTRA    = -20;
  2683.     [ helpstring("Class data: Style") ]
  2684.     const int GCD_STYLE         = -26;
  2685.     [ helpstring("Class long: Background brush handle") ]
  2686.     const int GCL_HBRBACKGROUND = -10;
  2687.     [ helpstring("Class long: Cursor handle") ]
  2688.     const int GCL_HCURSOR       = -12;
  2689.     [ helpstring("Class long: Module handle") ]
  2690.     const int GCL_HICON         = -14;
  2691.     [ helpstring("Class long: Module handle") ]
  2692.     const int GCL_HMODULE       = -16;
  2693.     [ helpstring("Class long: Window extra byte count") ]
  2694.     const int GCL_CBWNDEXTRA    = -18;
  2695.     [ helpstring("Class long: Class extra byte count") ]
  2696.     const int GCL_CBCLSEXTRA    = -20;
  2697.     [ helpstring("Class data: Style") ]
  2698.     const int GCL_STYLE         = -26;
  2699.  
  2700.     // Class styles
  2701.     [ helpstring("Class style: Redraw for vertical change") ]
  2702.     const int CS_VREDRAW      = 0x0001;
  2703.     [ helpstring("Class style: Redraw for horizontal change") ]
  2704.     const int CS_HREDRAW      = 0x0002;
  2705.  
  2706.     [ helpstring("Class style: DC for each window instance") ]
  2707.     const int CS_OWNDC        = 0x0020;
  2708.     [ helpstring("Class style: DC shared by class") ]
  2709.     const int CS_CLASSDC      = 0x0040;
  2710.     [ helpstring("Class style: Use DC of parent") ]
  2711.     const int CS_PARENTDC     = 0x0080;
  2712.  
  2713.     [ helpstring("Class style: Save screen image behind window") ]
  2714.     const int CS_SAVEBITS     = 0x0800;
  2715.  
  2716.     [ helpstring("Class style: Send double click message to window") ]
  2717.     const int CS_DBLCLKS      = 0x0008;
  2718.  
  2719.     [ helpstring("Class style: Align client area on x byte boundary") ]
  2720.     const int CS_BYTEALIGNCLIENT  = 0x1000;
  2721.     [ helpstring("Class style: Align window on x byte boundary") ]
  2722.     const int CS_BYTEALIGNWINDOW  = 0x2000;
  2723.  
  2724.     [ helpstring("Class style: Inhibit close on system menu") ]
  2725.     const int CS_NOCLOSE      = 0x0200;
  2726.  
  2727.     // ???
  2728.     // const int CS_KEYCVTWINDOW    = 0x0004;
  2729.     // const int CS_NOKEYCVT      = 0x0100;
  2730.  
  2731.     [ helpstring("Class style: Application global") ]
  2732.     const int CS_GLOBALCLASS      = 0x4000;
  2733.  
  2734.  
  2735.     // Window Styles
  2736.  
  2737.     // Basic window types
  2738.     [ helpstring("Window style: overlapped") ]
  2739.     const long WS_OVERLAPPED    = 0x00000000;
  2740.     [ helpstring("Window style: popup") ]
  2741.     const long WS_POPUP         = 0x80000000;
  2742.     [ helpstring("Window style: child") ]
  2743.     const long WS_CHILD         = 0x40000000;
  2744.  
  2745.     // Clipping styles
  2746.     [ helpstring("Window style: clip sibblings") ]
  2747.     const long WS_CLIPSIBLINGS  = 0x04000000;
  2748.     [ helpstring("Window style: clip children") ]
  2749.     const long WS_CLIPCHILDREN  = 0x02000000;
  2750.  
  2751.     // Generic window states
  2752.     [ helpstring("Window style: visible") ]
  2753.     const long WS_VISIBLE       = 0x10000000;
  2754.     [ helpstring("Window style: disabled") ]
  2755.     const long WS_DISABLED      = 0x08000000;
  2756.  
  2757.     // Main window states
  2758.     [ helpstring("Window style: minimized") ]
  2759.     const long WS_MINIMIZE      = 0x20000000;
  2760.     [ helpstring("Window style: maximized") ]
  2761.     const long WS_MAXIMIZE      = 0x01000000;
  2762.  
  2763.     // Main window styles
  2764.     [ helpstring("Window style: has caption") ]
  2765.     const long WS_CAPTION       = 0x00C00000;   // WS_BORDER | WS_DLGFRAME
  2766.     [ helpstring("Window style: has border") ]
  2767.     const long WS_BORDER        = 0x00800000;
  2768.     [ helpstring("Window style: has dialog frame") ]
  2769.     const long WS_DLGFRAME      = 0x00400000;
  2770.     [ helpstring("Window style: has vertical scroll bar") ]
  2771.     const long WS_VSCROLL       = 0x00200000;
  2772.     [ helpstring("Window style: has horizontal scroll bar") ]
  2773.     const long WS_HSCROLL       = 0x00100000;
  2774.     [ helpstring("Window style: has system menu") ]
  2775.     const long WS_SYSMENU       = 0x00080000;
  2776.     [ helpstring("Window style: has thick frame") ]
  2777.     const long WS_THICKFRAME    = 0x00040000;
  2778.     [ helpstring("Window style: has minimize box") ]
  2779.     const long WS_MINIMIZEBOX   = 0x00020000;
  2780.     [ helpstring("Window style: has maximize box") ]
  2781.     const long WS_MAXIMIZEBOX   = 0x00010000;
  2782.  
  2783.     // Control window styles
  2784.     [ helpstring("Window style: part of group") ]
  2785.     const long WS_GROUP         = 0x00020000;
  2786.     [ helpstring("Window style: has tabstop") ]
  2787.     const long WS_TABSTOP       = 0x00010000;
  2788.  
  2789.     // Common Window Styles
  2790.     [ helpstring("Window style: overlapped window (WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX)") ]
  2791.     const long WS_OVERLAPPEDWINDOW = 0x00CF0000;
  2792.  
  2793.     [ helpstring("Window style: popup window (WS_POPUP, WS_BORDER, and WS_SYSMENU)") ]
  2794.     const long WS_POPUPWINDOW   = 0x80880000;
  2795.  
  2796.     [ helpstring("Window style: child window (WS_CHILD)") ]
  2797.     const long WS_CHILDWINDOW   = 0x40000000;
  2798.  
  2799.     // Extended Window Styles
  2800.     [ helpstring("Extended window style: dialog modal frame") ]
  2801.     const long WS_EX_DLGMODALFRAME  = 0x00000001;
  2802.     [ helpstring("Extended window style: don't notify parent") ]
  2803.     const long WS_EX_NOPARENTNOTIFY = 0x00000004;
  2804.  
  2805.     [ helpstring("Extended window style: keep topmost") ]
  2806.     const long WS_EX_TOPMOST        = 0x00000008;
  2807.     [ helpstring("Extended window style: accept dragged files") ]
  2808.     const long WS_EX_ACCEPTFILES    = 0x00000010;
  2809.     [ helpstring("Extended window style: transparent") ]
  2810.     const long WS_EX_TRANSPARENT    = 0x00000020;
  2811.  
  2812.     /* Obsolete style names
  2813.     const long WS_TILED         = 0x00000000;
  2814.     const long WS_ICONIC        = 0x20000000;
  2815.     const long WS_SIZEBOX       = 0x00040000;
  2816.     const long WS_TILEDWINDOW   = 0x00CF0000;
  2817.     */
  2818.  
  2819.     // Special value for CreateWindow, et al.
  2820.     const int HWND_DESKTOP             = 0;
  2821.  
  2822.     const UINT CW_USEDEFAULT           = 0x8000;
  2823.  
  2824.     const UINT WPF_SETMINPOSITION      = 0x0001;
  2825.     const UINT WPF_RESTORETOMAXIMIZED  = 0x0002;
  2826.  
  2827.     // GetWindow() constants
  2828.     [ helpstring("GetWindow: Get first sibling") ]
  2829.     const int GW_HWNDFIRST  = 0;
  2830.     [ helpstring("GetWindow: Get last sibling") ]
  2831.     const int GW_HWNDLAST   = 1;
  2832.     [ helpstring("GetWindow: Get next sibling") ]
  2833.     const int GW_HWNDNEXT   = 2;
  2834.     [ helpstring("GetWindow: Get previous sibling") ]
  2835.     const int GW_HWNDPREV   = 3;
  2836.     [ helpstring("GetWindow: Get owner") ]
  2837.     const int GW_OWNER      = 4;
  2838.     [ helpstring("GetWindow: Get first child window") ]
  2839.     const int GW_CHILD      = 5;
  2840.  
  2841.     // SetWindowPos() and WINDOWPOS flags
  2842.     [ helpstring("SetWindowPos: Retain size (ignore cx and cy)") ]
  2843.     const int SWP_NOSIZE      = 0x0001;
  2844.     [ helpstring("SetWindowPos: Retain size (ignore x and y)") ]
  2845.     const int SWP_NOMOVE      = 0x0002;
  2846.     [ helpstring("SetWindowPos: Retain z-order (ignore hwndInsertAfter)") ]
  2847.     const int SWP_NOZORDER        = 0x0004;
  2848.     [ helpstring("SetWindowPos: Don't redraw window") ]
  2849.     const int SWP_NOREDRAW        = 0x0008;
  2850.     [ helpstring("SetWindowPos: Don't activate window") ]
  2851.     const int SWP_NOACTIVATE      = 0x0010;
  2852.     [ helpstring("SetWindowPos: Send WM_NCCALCSIZE") ]
  2853.     const int SWP_FRAMECHANGED    = 0x0020; // The frame changed: send WM_NCCALCSIZE
  2854.     [ helpstring("SetWindowPos: Display window") ]
  2855.     const int SWP_SHOWWINDOW      = 0x0040;
  2856.     [ helpstring("SetWindowPos: Hide window") ]
  2857.     const int SWP_HIDEWINDOW      = 0x0080;
  2858.     [ helpstring("SetWindowPos: Don't copy bits of client area") ]
  2859.     const int SWP_NOCOPYBITS      = 0x0100;
  2860.     [ helpstring("SetWindowPos: Don't do owner z-ordering") ]
  2861.     const int SWP_NOOWNERZORDER   = 0x0200; // Don't do owner Z ordering
  2862.  
  2863.     [ helpstring("SetWindowPos: Draw frame around window") ]
  2864.     const int SWP_DRAWFRAME       = 0x0020;
  2865.     [ helpstring("SetWindowPos: Don't do owner z-ordering") ]
  2866.     const int SWP_NOREPOSITION    = 0x0200;
  2867.  
  2868.     const int SWP_NOSENDCHANGING  = 0x0400;
  2869.     const int SWP_DEFERERASE      = 0x2000;
  2870.  
  2871.     // SetWindowPos() hwndInsertAfter field values
  2872.     [ helpstring("SetWindowPos: Put at top of z-order") ]
  2873.     const int HWND_TOP            = 0;
  2874.     [ helpstring("SetWindowPos: Put at bottom of z-order") ]
  2875.     const int HWND_BOTTOM         = 1;
  2876.     [ helpstring("SetWindowPos: Put above all non-topmost windows in z-order") ]
  2877.     const int HWND_TOPMOST        = -1;
  2878.     [ helpstring("SetWindowPos: Put at top non-topmost windows in z-order") ]
  2879.     const int HWND_NOTOPMOST      = -2;
  2880.  
  2881.     /*
  2882.     const long DCX_WINDOW         = 0x00000001;
  2883.     const long DCX_CACHE          = 0x00000002;
  2884.     const long DCX_CLIPCHILDREN   = 0x00000008;
  2885.     const long DCX_CLIPSIBLINGS   = 0x00000010;
  2886.     const long DCX_PARENTCLIP     = 0x00000020;
  2887.  
  2888.     const long DCX_EXCLUDERGN     = 0x00000040;
  2889.     const long DCX_INTERSECTRGN   = 0x00000080;
  2890.  
  2891.     const long DCX_LOCKWINDOWUPDATE = 0x00000400;
  2892.  
  2893.     const long DCX_USESTYLE       = 0x00010000;
  2894.  
  2895.     const int RDW_INVALIDATE      = 0001;
  2896.     const int RDW_INTERNALPAINT   = 0002;
  2897.     const int RDW_ERASE           = 0004;
  2898.  
  2899.     const int RDW_VALIDATE        = 0008;
  2900.     const int RDW_NOINTERNALPAINT = 0010;
  2901.     const int RDW_NOERASE         = 0020;
  2902.  
  2903.     const int RDW_NOCHILDREN      = 0040;
  2904.     const int RDW_ALLCHILDREN     = 0080;
  2905.  
  2906.     const int RDW_UPDATENOW       = 0100;
  2907.     const int RDW_ERASENOW        = 0200;
  2908.  
  2909.     const int RDW_FRAME           = 0400;
  2910.     const int RDW_NOFRAME         = 0800;
  2911.  
  2912.     const int SW_SCROLLCHILDREN   = 0001;
  2913.     const int SW_INVALIDATE       = 0002;
  2914.     const int SW_ERASE            = 0004;
  2915.     */
  2916.  
  2917.     // Predefined Clipboard Formats
  2918.     const int CF_TEXT          = 1;
  2919.     const int CF_BITMAP        = 2;
  2920.     const int CF_METAFILEPICT  = 3;
  2921.     const int CF_SYLK          = 4;
  2922.     const int CF_DIF           = 5;
  2923.     const int CF_TIFF          = 6;
  2924.     const int CF_OEMTEXT       = 7;
  2925.     const int CF_DIB           = 8;
  2926.     const int CF_PALETTE       = 9;
  2927.     const int CF_PENDATA       = 10;
  2928.     const int CF_RIFF          = 11;
  2929.     const int CF_WAVE          = 12;
  2930.  
  2931.     const int CF_OWNERDISPLAY  = 0x0080;
  2932.     const int CF_DSPTEXT      = 0x0081;
  2933.     const int CF_DSPBITMAP        = 0x0082;
  2934.     const int CF_DSPMETAFILEPICT  = 0x0083;
  2935.  
  2936.     // Private formats don't get GlobalFree()'d
  2937.     const int CF_PRIVATEFIRST  = 0x0200;
  2938.     const int CF_PRIVATELAST      = 0x02FF;
  2939.  
  2940.     // GDIOBJ formats do get DeleteObject()'d
  2941.     const int CF_GDIOBJFIRST      = 0x0300;
  2942.     const int CF_GDIOBJLAST       = 0x03FF;
  2943.  
  2944.     // Standard cursor resource IDs
  2945.     [ helpstring("Standard cursor: Arrow") ]
  2946.     const long IDC_ARROW          = 32512;
  2947.     [ helpstring("Standard cursor: I-Beam") ]
  2948.     const long IDC_IBEAM          = 32513;
  2949.     [ helpstring("Standard cursor: Hourglass") ]
  2950.     const long IDC_WAIT           = 32514;
  2951.     [ helpstring("Standard cursor: Cross") ]
  2952.     const long IDC_CROSS          = 32515;
  2953.     [ helpstring("Standard cursor: Up arrow") ]
  2954.     const long IDC_UPARROW        = 32516;
  2955.     [ helpstring("Standard cursor: Resize") ]
  2956.     const long IDC_SIZE           = 32640;
  2957.     [ helpstring("Standard cursor: Icon") ]
  2958.     const long IDC_ICON           = 32641;
  2959.     [ helpstring("Standard cursor: Northwest-southeast size") ]
  2960.     const long IDC_SIZENWSE       = 32642;
  2961.     [ helpstring("Standard cursor: Northeast-southwest size") ]
  2962.     const long IDC_SIZENESW       = 32643;
  2963.     [ helpstring("Standard cursor: West-east size") ]
  2964.     const long IDC_SIZEWE         = 32644;
  2965.     [ helpstring("Standard cursor: North-south size") ]
  2966.     const long IDC_SIZENS         = 32645;
  2967.  
  2968.     // Standard icon resource IDs
  2969.     [ helpstring("Standard icon: Application") ]
  2970.     const long IDI_APPLICATION  = 32512;
  2971.     [ helpstring("Standard icon: Hand") ]
  2972.     const long IDI_HAND         = 32513;
  2973.     [ helpstring("Standard icon: Question mark") ]
  2974.     const long IDI_QUESTION     = 32514;
  2975.     [ helpstring("Standard icon: Exclamation mark") ]
  2976.     const long IDI_EXCLAMATION  = 32515;
  2977.     [ helpstring("Standard icon: Asterisk") ]
  2978.     const long IDI_ASTERISK     = 32516;
  2979.  
  2980.     [ helpstring("LoadImage: Bitmap") ]
  2981.     const long IMAGE_BITMAP         = 0;
  2982.     [ helpstring("LoadImage: Icon") ]
  2983.     const long IMAGE_ICON           = 1;
  2984.     [ helpstring("LoadImage: Cursor") ]
  2985.     const long IMAGE_CURSOR         = 2;
  2986.     [ helpstring("LoadImage: Metafile") ]
  2987.     const long IMAGE_ENHMETAFILE    = 3;
  2988.  
  2989.     [ helpstring("LoadImage: Use the color format of the display") ]
  2990.     const long LR_DEFAULTCOLOR      = 0x0000;
  2991.     [ helpstring("LoadImage or CopyImage: Convert to black and white") ]
  2992.     const long LR_MONOCHROME        = 0x0001;
  2993.     const long LR_COLOR             = 0x0002;
  2994.     [ helpstring("CopyImage: Copy exactly, ignoring desired size") ]
  2995.     const long LR_COPYRETURNORG     = 0x0004;
  2996.     [ helpstring("CopyImage: Delete original image after making copy") ]
  2997.     const long LR_COPYDELETEORG     = 0x0008;
  2998.     [ helpstring("LoadImage: Load from file rather than resource") ]
  2999.     const long LR_LOADFROMFILE      = 0x0010;
  3000.     [ helpstring("LoadImage: Use window color for all pixels matching color of first image pixel") ]
  3001.     const long LR_LOADTRANSPARENT   = 0x0020;
  3002.     [ helpstring("LoadImage: Use system default size or resource default size") ]
  3003.     const long LR_DEFAULTSIZE       = 0x0040;
  3004.     const long LR_VGACOLOR          = 0x0080;
  3005.     [ helpstring("LoadImage: Replace shades of gray with 3D system colors") ]
  3006.     const long LR_LOADMAP3DCOLORS   = 0x1000;
  3007.     [ helpstring("LoadImage: Create a DIB rather than a compatible bitmap") ]
  3008.     const long LR_CREATEDIBSECTION  = 0x2000;
  3009.     const long LR_COPYFROMRESOURCE  = 0x4000;
  3010.     [ helpstring("LoadImage: Share the image handle if loaded multiple times") ]
  3011.     const long LR_SHARED            = 0x8000;
  3012.  
  3013.     [ helpstring("DrawIconEx: Blits the mask") ]
  3014.     const long DI_MASK              = 0x0001;
  3015.     [ helpstring("DrawIconEx: Blits the image") ]
  3016.     const long DI_IMAGE             = 0x0002;
  3017.     [ helpstring("DrawIconEx: Blits the image and mask") ]
  3018.     const long DI_NORMAL            = 0x0003;
  3019.     [ helpstring("DrawIconEx: Uses the system default images rather than given image") ]
  3020.     const long DI_COMPAT            = 0x0004;
  3021.     [ helpstring("DrawIconEx: Draws default size, ignoring width and height arguments") ]
  3022.     const long DI_DEFAULTSIZE       = 0x0008;
  3023.  
  3024.     const int MB_OK                 = 0x0000;
  3025.     const int MB_OKCANCEL           = 0x0001;
  3026.     const int MB_ABORTRETRYIGNORE   = 0x0002;
  3027.     const int MB_YESNOCANCEL        = 0x0003;
  3028.     const int MB_YESNO              = 0x0004;
  3029.     const int MB_RETRYCANCEL        = 0x0005;
  3030.     const int MB_TYPEMASK           = 0x000F;
  3031.  
  3032.     const int MB_ICONHAND           = 0x0010;
  3033.     const int MB_ICONQUESTION       = 0x0020;
  3034.     const int MB_ICONEXCLAMATION    = 0x0030;
  3035.     const int MB_ICONASTERISK       = 0x0040;
  3036.     const int MB_ICONMASK           = 0x00F0;
  3037.  
  3038.     const int MB_ICONINFORMATION    = 0x0040;
  3039.     const int MB_ICONSTOP           = 0x0010;
  3040.  
  3041.     const int MB_DEFBUTTON1         = 0x0000;
  3042.     const int MB_DEFBUTTON2         = 0x0100;
  3043.     const int MB_DEFBUTTON3         = 0x0200;
  3044.     const int MB_DEFMASK            = 0x0F00;
  3045.  
  3046.     const int MB_APPLMODAL          = 0x0000;
  3047.     const int MB_SYSTEMMODAL        = 0x1000;
  3048.     const int MB_TASKMODAL          = 0x2000;
  3049.  
  3050.     const int MB_NOFOCUS            = 0x8000;
  3051.  
  3052.     const int MDIS_ALLCHILDSTYLES   = 0x0001;
  3053.  
  3054.     /*
  3055.     // Dialog window class
  3056.     const int MAXINTATOM = 0xC000;
  3057.     //define MAKEINTATOM(i) (LPTSTR)((DWORD)((WORD)(i)))
  3058.     const int INVALID_ATOM  = 0;
  3059.  
  3060.     const int WC_DIALOG   (MAKEINTATOM(0x8002))
  3061.  
  3062.     // cbWndExtra bytes needed by dialog manager for dialog classes
  3063.     const int DLGWINDOWEXTRA  = 30;
  3064.  
  3065.     // Dialog styles
  3066.     const long DS_ABSALIGN        = 0x01;
  3067.     const long DS_SYSMODAL        = 0x02;
  3068.     const long DS_LOCALEDIT        = 0x20;
  3069.     const long DS_SETFONT          = 0x40;
  3070.     const long DS_MODALFRAME       = 0x80;
  3071.     const long DS_NOIDLEMSG        = 0x100;
  3072.  
  3073.     */
  3074.  
  3075.     // Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  3076.     const int DWL_MSGRESULT        = 0;
  3077.     const int DWL_DLGPROC        = 4;
  3078.     const int DWL_USER            = 8;
  3079.  
  3080.     // Standard dialog button IDs
  3081.     const int IDOK            = 1;
  3082.     const int IDCANCEL        = 2;
  3083.     const int IDABORT          = 3;
  3084.     const int IDRETRY          = 4;
  3085.     const int IDIGNORE        = 5;
  3086.     const int IDYES           = 6;
  3087.     const int IDNO            = 7;
  3088.  
  3089.     // ****** Owner draw control support ********
  3090.     /*
  3091.     // Owner draw control types
  3092.     const int ODT_MENU    = 1;
  3093.     const int ODT_LISTBOX = 2;
  3094.     const int ODT_COMBOBOX    = 3;
  3095.     const int ODT_BUTTON  = 4;
  3096.  
  3097.     // Owner draw actions
  3098.     const int ODA_DRAWENTIRE  = 0x0001;
  3099.     const int ODA_SELECT  = 0x0002;
  3100.     const int ODA_FOCUS   = 0x0004;
  3101.  
  3102.     // Owner draw state
  3103.     const int ODS_SELECTED    = 0x0001;
  3104.     const int ODS_GRAYED  = 0x0002;
  3105.     const int ODS_DISABLED    = 0x0004;
  3106.     const int ODS_CHECKED = 0x0008;
  3107.     const int ODS_FOCUS   = 0x0010;
  3108.     */
  3109.  
  3110.     // ****** Static control *******
  3111.     /*
  3112.     // Static Control Styles
  3113.     const DWORD SS_LEFT        = 0x00000000;
  3114.     const DWORD SS_CENTER      = 0x00000001;
  3115.     const DWORD SS_RIGHT       = 0x00000002;
  3116.     const DWORD SS_ICON        = 0x00000003;
  3117.     const DWORD SS_BLACKRECT       = 0x00000004;
  3118.     const DWORD SS_GRAYRECT        = 0x00000005;
  3119.     const DWORD SS_WHITERECT       = 0x00000006;
  3120.     const DWORD SS_BLACKFRAME      = 0x00000007;
  3121.     const DWORD SS_GRAYFRAME       = 0x00000008;
  3122.     const DWORD SS_WHITEFRAME      = 0x00000009;
  3123.     const DWORD SS_SIMPLE      = 0x0000000B;
  3124.     const DWORD SS_LEFTNOWORDWRAP   = 0x0000000C;
  3125.     const DWORD SS_NOPREFIX         = 0x00000080;
  3126.  
  3127.     // ****** Button control ******
  3128.  
  3129.     // Button Control Styles
  3130.     const DWORD BS_PUSHBUTTON      = 0x00000000;
  3131.     const DWORD BS_DEFPUSHBUTTON    = 0x00000001;
  3132.     const DWORD BS_CHECKBOX        = 0x00000002;
  3133.     const DWORD BS_AUTOCHECKBOX     = 0x00000003;
  3134.     const DWORD BS_RADIOBUTTON     = 0x00000004;
  3135.     const DWORD BS_3STATE      = 0x00000005;
  3136.     const DWORD BS_AUTO3STATE      = 0x00000006;
  3137.     const DWORD BS_GROUPBOX        = 0x00000007;
  3138.     const DWORD BS_USERBUTTON      = 0x00000008;
  3139.     const DWORD BS_AUTORADIOBUTTON  = 0x00000009;
  3140.     const DWORD BS_OWNERDRAW       = 0x0000000B;
  3141.     const DWORD BS_LEFTTEXT        = 0x00000020;
  3142.     */
  3143.  
  3144.     // ****** Edit control ********
  3145.  
  3146.     // Edit control styles
  3147.     const DWORD ES_LEFT        = 0x00000000;
  3148.     const DWORD ES_CENTER      = 0x00000001;
  3149.     const DWORD ES_RIGHT       = 0x00000002;
  3150.     const DWORD ES_MULTILINE   = 0x00000004;
  3151.     const DWORD ES_UPPERCASE   = 0x00000008;
  3152.     const DWORD ES_LOWERCASE   = 0x00000010;
  3153.     const DWORD ES_PASSWORD    = 0x00000020;
  3154.     const DWORD ES_AUTOVSCROLL = 0x00000040;
  3155.     const DWORD ES_AUTOHSCROLL = 0x00000080;
  3156.     const DWORD ES_NOHIDESEL   = 0x00000100;
  3157.     const DWORD ES_OEMCONVERT  = 0x00000400;
  3158.     const DWORD ES_READONLY    = 0x00000800;
  3159.     const DWORD ES_WANTRETURN  = 0x00001000;
  3160.  
  3161.     // ****** Scroll bar control ******
  3162.  
  3163.     /*
  3164.     // Also see scrolling support
  3165.  
  3166.     // Scroll bar styles
  3167.     const DWORD SBS_HORZ           = 0x0000;
  3168.     const DWORD SBS_VERT           = 0x0001;
  3169.     const DWORD SBS_TOPALIGN           = 0x0002;
  3170.     const DWORD SBS_LEFTALIGN          = 0x0002;
  3171.     const DWORD SBS_BOTTOMALIGN            = 0x0004;
  3172.     const DWORD SBS_RIGHTALIGN         = 0x0004;
  3173.     const DWORD SBS_SIZEBOXTOPLEFTALIGN        = 0x0002;
  3174.     const DWORD SBS_SIZEBOXBOTTOMRIGHTALIGN = 0x0004;
  3175.     const DWORD SBS_SIZEBOX            = 0x0008;
  3176.     */
  3177.  
  3178.     // ****** Listbox control *****
  3179.  
  3180.     // Listbox styles
  3181.     const DWORD LBS_NOTIFY            = 0x00000001;
  3182.     const DWORD LBS_SORT              = 0x00000002;
  3183.     const DWORD LBS_NOREDRAW          = 0x00000004;
  3184.     const DWORD LBS_MULTIPLESEL       = 0x00000008;
  3185.     const DWORD LBS_OWNERDRAWFIXED    = 0x00000010;
  3186.     const DWORD LBS_OWNERDRAWVARIABLE = 0x00000020;
  3187.     const DWORD LBS_HASSTRINGS        = 0x00000040;
  3188.     const DWORD LBS_USETABSTOPS       = 0x00000080;
  3189.     const DWORD LBS_NOINTEGRALHEIGHT  = 0x00000100;
  3190.     const DWORD LBS_MULTICOLUMN       = 0x00000200;
  3191.     const DWORD LBS_WANTKEYBOARDINPUT = 0x00000400;
  3192.     const DWORD LBS_EXTENDEDSEL       = 0x00000800;
  3193.     const DWORD LBS_DISABLENOSCROLL   = 0x00001000;
  3194.     const DWORD LBS_NODATA            = 0x00002000;
  3195.     const DWORD LBS_NOSEL             = 0x00004000;
  3196.     const DWORD LBS_STANDARD          = 0x00A00003;  // (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  3197.  
  3198.  
  3199.     // DlgDirList, DlgDirListComboBox flags values
  3200.     const UINT DDL_READWRITE          = 0x0000;
  3201.     const UINT DDL_READONLY           = 0x0001;
  3202.     const UINT DDL_HIDDEN             = 0x0002;
  3203.     const UINT DDL_SYSTEM             = 0x0004;
  3204.     const UINT DDL_DIRECTORY          = 0x0010;
  3205.     const UINT DDL_ARCHIVE            = 0x0020;
  3206.  
  3207.     const UINT DDL_POSTMSGS           = 0x2000;
  3208.     const UINT DDL_DRIVES             = 0x4000;
  3209.     const UINT DDL_EXCLUSIVE          = 0x8000;
  3210.  
  3211.     // ****** Combo box control ***
  3212.  
  3213.     // Combo box styles
  3214.     const DWORD CBS_SIMPLE       = 0x0001;
  3215.     const DWORD CBS_DROPDOWN         = 0x0002;
  3216.     const DWORD CBS_DROPDOWNLIST      = 0x0003;
  3217.     const DWORD CBS_OWNERDRAWFIXED    = 0x0010;
  3218.     const DWORD CBS_OWNERDRAWVARIABLE = 0x0020;
  3219.     const DWORD CBS_AUTOHSCROLL       = 0x0040;
  3220.     const DWORD CBS_OEMCONVERT        = 0x0080;
  3221.     const DWORD CBS_SORT              = 0x0100;
  3222.     const DWORD CBS_HASSTRINGS        = 0x0200;
  3223.     const DWORD CBS_NOINTEGRALHEIGHT  = 0x0400;
  3224.     const DWORD CBS_DISABLENOSCROLL   = 0x0800;
  3225.  
  3226.     /*
  3227.     // Standard hook code
  3228.     const int HC_ACTION       = 0;
  3229.  
  3230.     // Obsolete hook codes (NO LONGER SUPPORTED)
  3231.     const int HC_GETLPLPFN        = -3;
  3232.     const int HC_LPLPFNNEXT       = -2;
  3233.     const int HC_LPFNNEXT         = -1;
  3234.  
  3235.     // CallMsgFilter() and WH_SYS/MSGFILTER context codes
  3236.     const int MSGF_DIALOGBOX       = 0;
  3237.     const int MSGF_MENU        = 2;
  3238.     const int MSGF_MOVE        = 3;
  3239.     const int MSGF_SIZE        = 4;
  3240.     const int MSGF_SCROLLBAR       = 5;
  3241.     const int MSGF_NEXTWINDOW  = 6;
  3242.     const int MSGF_MAINLOOP             = 8;
  3243.     const int MSGF_USER                 = 4096;
  3244.  
  3245.     const int WH_GETMESSAGE       = 3;
  3246.  
  3247.     const int WH_CALLWNDPROC      = 4;
  3248.  
  3249.     const int WH_MSGFILTER        = -1;
  3250.     const int WH_SYSMSGFILTER     = 6;
  3251.  
  3252.     // SetWindowsHook() keyboard hook
  3253.     const int WH_KEYBOARD     = 2;
  3254.  
  3255.     // SetWindowsHook() mouse hook
  3256.     const int WH_MOUSE        = 7;
  3257.  
  3258.     const int WH_HARDWARE     = 8;
  3259.  
  3260.     // SetWindowsHook() code
  3261.     const int WH_CBT          = 5;
  3262.  
  3263.     // SetWindowsHook() Shell hook code
  3264.     const int WH_SHELL            = 10;
  3265.  
  3266.     // Journalling hook codes
  3267.     const int HC_GETNEXT      = 1;
  3268.     const int HC_SKIP     = 2;
  3269.     const int HC_NOREMOVE     = 3;
  3270.     const int HC_NOREM        = 3;
  3271.     const int HC_SYSMODALON        = 4;
  3272.     const int HC_SYSMODALOFF      = 5;
  3273.  
  3274.     // SetWindowsHook debug hook support
  3275.     const int WH_DEBUG        = 9;
  3276.  
  3277.     const int HCBT_MOVESIZE       = 0;
  3278.     const int HCBT_MINMAX     = 1;
  3279.     const int HCBT_QS     = 2;
  3280.     const int HCBT_CREATEWND      = 3;
  3281.     const int HCBT_DESTROYWND     = 4;
  3282.     const int HCBT_ACTIVATE       = 5;
  3283.     const int HCBT_CLICKSKIPPED    = 6;
  3284.     const int HCBT_KEYSKIPPED  = 7;
  3285.     const int HCBT_SYSCOMMAND     = 8;
  3286.     const int HCBT_SETFOCUS       = 9;
  3287.  
  3288.     const int HSHELL_WINDOWCREATED        = 1;
  3289.     const int HSHELL_WINDOWDESTROYED  = 2;
  3290.     const int HSHELL_ACTIVATESHELLWINDOW = 3;
  3291.  
  3292.     const int WH_JOURNALRECORD     = 0;
  3293.     const int WH_JOURNALPLAYBACK  = 1;
  3294.  
  3295.     // Flags returned by GetSystemDebugState.
  3296.  
  3297.     const UINT SDS_MENU         = 0x0001;
  3298.     const UINT SDS_SYSMODAL     = 0x0002;
  3299.     const UINT SDS_NOTASKQUEUE = 0x0004;
  3300.     const UINT SDS_DIALOG   = 0x0008;
  3301.     const UINT SDS_TASKLOCKED  = 0x0010;
  3302.  
  3303.     // WinHelp() commands
  3304.     const UINT HELP_CONTEXT       = 0x0001;
  3305.     const UINT HELP_QUIT          = 0x0002;
  3306.     const UINT HELP_INDEX     = 0x0003;
  3307.     const UINT HELP_CONTENTS      = 0x0003;
  3308.     const UINT HELP_HELPONHELP   = 0x0004;
  3309.     const UINT HELP_SETINDEX      = 0x0005;
  3310.     const UINT HELP_SETCONTENTS  = 0x0005;
  3311.     const UINT HELP_CONTEXTPOPUP = 0x0008;
  3312.     const UINT HELP_FORCEFILE    = 0x0009;
  3313.     const UINT HELP_KEY           = 0x0101;
  3314.     const UINT HELP_COMMAND       = 0x0102;
  3315.     const UINT HELP_PARTIALKEY   = 0x0105;
  3316.     const UINT HELP_MULTIKEY      = 0x0201;
  3317.     const UINT HELP_SETWINPOS    = 0x0203;
  3318.     */
  3319.  
  3320.     [ helpstring("Virtual key: Left mouse button") ]
  3321.     const int VK_LBUTTON    = 0x1;
  3322.     [ helpstring("Virtual key: Right mouse button") ]
  3323.     const int VK_RBUTTON    = 0x2;
  3324.     [ helpstring("Virtual key: Used for control+break processing") ]
  3325.     const int VK_CANCEL     = 0x3;
  3326.     [ helpstring("Virtual key: Middle mouse button") ]
  3327.     const int VK_MBUTTON    = 0x4;
  3328.     [ helpstring("Virtual key: Backspace") ]
  3329.     const int VK_BACK       = 0x8;
  3330.     [ helpstring("Virtual key: Tab") ]
  3331.     const int VK_TAB        = 0x9;
  3332.     [ helpstring("Virtual key: Clear") ]
  3333.     const int VK_CLEAR      = 0xC;
  3334.     [ helpstring("Virtual key: Enter") ]
  3335.     const int VK_RETURN     = 0xD;
  3336.     [ helpstring("Virtual key: Shift") ]
  3337.     const int VK_SHIFT      = 0x10;
  3338.     [ helpstring("Virtual key: Ctrl") ]
  3339.     const int VK_CONTROL    = 0x11;
  3340.     [ helpstring("Virtual key: Alt") ]
  3341.     const int VK_MENU       = 0x12;
  3342.     [ helpstring("Virtual key: Pause") ]
  3343.     const int VK_PAUSE      = 0x13;
  3344.     [ helpstring("Virtual key: Caps Lock") ]
  3345.     const int VK_CAPITAL    = 0x14;
  3346.     [ helpstring("Virtual key: Esc") ]
  3347.     const int VK_ESCAPE     = 0x1B;
  3348.     [ helpstring("Virtual key: Spacebar") ]
  3349.     const int VK_SPACE      = 0x20;
  3350.     [ helpstring("Virtual key: Page Up") ]
  3351.     const int VK_PRIOR      = 0x21;
  3352.     [ helpstring("Virtual key: Page Down") ]
  3353.     const int VK_NEXT       = 0x22;
  3354.     [ helpstring("Virtual key: End") ]
  3355.     const int VK_END        = 0x23;
  3356.     [ helpstring("Virtual key: Home") ]
  3357.     const int VK_HOME       = 0x24;
  3358.     [ helpstring("Virtual key: Left Arrow") ]
  3359.     const int VK_LEFT       = 0x25;
  3360.     [ helpstring("Virtual key: Right Arrow") ]
  3361.     const int VK_UP         = 0x26;
  3362.     [ helpstring("Virtual key: Up Arrow") ]
  3363.     const int VK_RIGHT      = 0x27;
  3364.     [ helpstring("Virtual key: Down Arrow") ]
  3365.     const int VK_DOWN       = 0x28;
  3366.     [ helpstring("Virtual key: Select") ]
  3367.     const int VK_SELECT     = 0x29;
  3368.     [ helpstring("Virtual key: OEM Specific") ]
  3369.     const int VK_PRINT      = 0x2A;
  3370.     [ helpstring("Virtual key: Execute") ]
  3371.     const int VK_EXECUTE    = 0x2B;
  3372.     [ helpstring("Virtual key: PrtScr") ]
  3373.     const int VK_SNAPSHOT   = 0x2C;
  3374.     [ helpstring("Virtual key: Ins") ]
  3375.     const int VK_INSERT     = 0x2D;
  3376.     [ helpstring("Virtual key: Del") ]
  3377.     const int VK_DELETE     = 0x2E;
  3378.     [ helpstring("Virtual key: Help") ]
  3379.     const int VK_HELP       = 0x2F;
  3380.     [ helpstring("Virtual key: 0") ]
  3381.     const int VK_0          = 0x30;
  3382.     [ helpstring("Virtual key: 1") ]
  3383.     const int VK_1          = 0x31;
  3384.     [ helpstring("Virtual key: 2") ]
  3385.     const int VK_2          = 0x32;
  3386.     [ helpstring("Virtual key: 3") ]
  3387.     const int VK_3          = 0x33;
  3388.     [ helpstring("Virtual key: 4") ]
  3389.     const int VK_4          = 0x34;
  3390.     [ helpstring("Virtual key: 5") ]
  3391.     const int VK_5          = 0x35;
  3392.     [ helpstring("Virtual key: 6") ]
  3393.     const int VK_6          = 0x36;
  3394.     [ helpstring("Virtual key: 7") ]
  3395.     const int VK_7          = 0x37;
  3396.     [ helpstring("Virtual key: 8") ]
  3397.     const int VK_8          = 0x38;
  3398.     [ helpstring("Virtual key: 9") ]
  3399.     const int VK_9          = 0x39;
  3400.     [ helpstring("Virtual key: A") ]
  3401.     const int VK_A          = 0x41;
  3402.     [ helpstring("Virtual key: B") ]
  3403.     const int VK_B          = 0x42;
  3404.     [ helpstring("Virtual key: C") ]
  3405.     const int VK_C          = 0x43;
  3406.     [ helpstring("Virtual key: D") ]
  3407.     const int VK_D          = 0x44;
  3408.     [ helpstring("Virtual key: E") ]
  3409.     const int VK_E          = 0x45;
  3410.     [ helpstring("Virtual key: F") ]
  3411.     const int VK_F          = 0x46;
  3412.     [ helpstring("Virtual key: G") ]
  3413.     const int VK_G          = 0x47;
  3414.     [ helpstring("Virtual key: H") ]
  3415.     const int VK_H          = 0x48;
  3416.     [ helpstring("Virtual key: I") ]
  3417.     const int VK_I          = 0x49;
  3418.     [ helpstring("Virtual key: J") ]
  3419.     const int VK_J          = 0x4A;
  3420.     [ helpstring("Virtual key: K") ]
  3421.     const int VK_K          = 0x4B;
  3422.     [ helpstring("Virtual key: L") ]
  3423.     const int VK_L          = 0x4C;
  3424.     [ helpstring("Virtual key: M") ]
  3425.     const int VK_M          = 0x4D;
  3426.     [ helpstring("Virtual key: N") ]
  3427.     const int VK_N          = 0x4E;
  3428.     [ helpstring("Virtual key: O") ]
  3429.     const int VK_O          = 0x4F;
  3430.     [ helpstring("Virtual key: P") ]
  3431.     const int VK_P          = 0x50;
  3432.     [ helpstring("Virtual key: Q") ]
  3433.     const int VK_Q          = 0x51;
  3434.     [ helpstring("Virtual key: R") ]
  3435.     const int VK_R          = 0x52;
  3436.     [ helpstring("Virtual key: S") ]
  3437.     const int VK_S          = 0x53;
  3438.     [ helpstring("Virtual key: T") ]
  3439.     const int VK_T          = 0x54;
  3440.     [ helpstring("Virtual key: U") ]
  3441.     const int VK_U          = 0x55;
  3442.     [ helpstring("Virtual key: V") ]
  3443.     const int VK_V          = 0x56;
  3444.     [ helpstring("Virtual key: W") ]
  3445.     const int VK_W          = 0x57;
  3446.     [ helpstring("Virtual key: X") ]
  3447.     const int VK_X          = 0x58;
  3448.     [ helpstring("Virtual key: Y") ]
  3449.     const int VK_Y          = 0x59;
  3450.     [ helpstring("Virtual key: Z") ]
  3451.     const int VK_Z          = 0x5A;
  3452.     [ helpstring("Virtual key: 0 on number pad") ]
  3453.     const int VK_NUMPAD0    = 0x60;
  3454.     [ helpstring("Virtual key: 1 on number pad") ]
  3455.     const int VK_NUMPAD1    = 0x61;
  3456.     [ helpstring("Virtual key: 2 on number pad") ]
  3457.     const int VK_NUMPAD2    = 0x62;
  3458.     [ helpstring("Virtual key: 3 on number pad") ]
  3459.     const int VK_NUMPAD3    = 0x63;
  3460.     [ helpstring("Virtual key: 4 on number pad") ]
  3461.     const int VK_NUMPAD4    = 0x64;
  3462.     [ helpstring("Virtual key: 5 on number pad") ]
  3463.     const int VK_NUMPAD5    = 0x65;
  3464.     [ helpstring("Virtual key: 6 on number pad") ]
  3465.     const int VK_NUMPAD6    = 0x66;
  3466.     [ helpstring("Virtual key: 7 on number pad") ]
  3467.     const int VK_NUMPAD7    = 0x67;
  3468.     [ helpstring("Virtual key: 8 on number pad") ]
  3469.     const int VK_NUMPAD8    = 0x68;
  3470.     [ helpstring("Virtual key: 9 on number pad") ]
  3471.     const int VK_NUMPAD9    = 0x69;
  3472.     [ helpstring("Virtual key: Multiply") ]
  3473.     const int VK_MULTIPLY   = 0x6A;
  3474.     [ helpstring("Virtual key: Add") ]
  3475.     const int VK_ADD        = 0x6B;
  3476.     [ helpstring("Virtual key: Separator") ]
  3477.     const int VK_SEPARATOR  = 0x6C;
  3478.     [ helpstring("Virtual key: Subtract") ]
  3479.     const int VK_SUBTRACT   = 0x6D;
  3480.     [ helpstring("Virtual key: Decimal") ]
  3481.     const int VK_DECIMAL    = 0x6E;
  3482.     [ helpstring("Virtual key: Divide") ]
  3483.     const int VK_DIVIDE     = 0x6F;
  3484.     [ helpstring("Virtual key: F1") ]
  3485.     const int VK_F1         = 0x70;
  3486.     [ helpstring("Virtual key: F2") ]
  3487.     const int VK_F2         = 0x71;
  3488.     [ helpstring("Virtual key: F3") ]
  3489.     const int VK_F3         = 0x72;
  3490.     [ helpstring("Virtual key: F4") ]
  3491.     const int VK_F4         = 0x73;
  3492.     [ helpstring("Virtual key: F5") ]
  3493.     const int VK_F5         = 0x74;
  3494.     [ helpstring("Virtual key: F6") ]
  3495.     const int VK_F6         = 0x75;
  3496.     [ helpstring("Virtual key: F7") ]
  3497.     const int VK_F7         = 0x76;
  3498.     [ helpstring("Virtual key: F8") ]
  3499.     const int VK_F8         = 0x77;
  3500.     [ helpstring("Virtual key: F9") ]
  3501.     const int VK_F9         = 0x78;
  3502.     [ helpstring("Virtual key: F10") ]
  3503.     const int VK_F10        = 0x79;
  3504.     [ helpstring("Virtual key: F11") ]
  3505.     const int VK_F11        = 0x7A;
  3506.     [ helpstring("Virtual key: F12") ]
  3507.     const int VK_F12        = 0x7B;
  3508.     [ helpstring("Virtual key: F13") ]
  3509.     const int VK_F13        = 0x7C;
  3510.     [ helpstring("Virtual key: F14") ]
  3511.     const int VK_F14        = 0x7D;
  3512.     [ helpstring("Virtual key: F15") ]
  3513.     const int VK_F15        = 0x7E;
  3514.     [ helpstring("Virtual key: F16") ]
  3515.     const int VK_F16        = 0x7F;
  3516.     [ helpstring("Virtual key: F17") ]
  3517.     const int VK_F17        = 0x80;
  3518.     [ helpstring("Virtual key: F18") ]
  3519.     const int VK_F18        = 0x81;
  3520.     [ helpstring("Virtual key: F19") ]
  3521.     const int VK_F19        = 0x82;
  3522.     [ helpstring("Virtual key: F20") ]
  3523.     const int VK_F20        = 0x83;
  3524.     [ helpstring("Virtual key: F21") ]
  3525.     const int VK_F21        = 0x84;
  3526.     [ helpstring("Virtual key: F22") ]
  3527.     const int VK_F22        = 0x85;
  3528.     [ helpstring("Virtual key: F23") ]
  3529.     const int VK_F23        = 0x86;
  3530.     [ helpstring("Virtual key: F24") ]
  3531.     const int VK_F24        = 0x87;
  3532.     [ helpstring("Virtual key: NumLock") ]
  3533.     const int VK_NUMLOCK    = 0x90;
  3534.     [ helpstring("Virtual key: ScrollLock") ]
  3535.     const int VK_SCROLL     = 0x91;
  3536.  
  3537.     const UINT MF_INSERT      = 0x0000;
  3538.     const UINT MF_CHANGE      = 0x0080;
  3539.     const UINT MF_APPEND      = 0x0100;
  3540.     const UINT MF_DELETE      = 0x0200;
  3541.     const UINT MF_REMOVE      = 0x1000;
  3542.  
  3543.     // Menu flags for Add/Check/EnableMenuItem()
  3544.     const UINT MF_BYCOMMAND   = 0x0000;
  3545.     const UINT MF_BYPOSITION   = 0x0400;
  3546.  
  3547.     const UINT MF_SEPARATOR   = 0x0800;
  3548.  
  3549.     const UINT MF_ENABLED     = 0x0000;
  3550.     const UINT MF_GRAYED      = 0x0001;
  3551.     const UINT MF_DISABLED    = 0x0002;
  3552.  
  3553.     const UINT MF_UNCHECKED   = 0x0000;
  3554.     const UINT MF_CHECKED     = 0x0008;
  3555.     const UINT MF_USECHECKBITMAPS  = 0x0200;
  3556.  
  3557.     const UINT MF_STRING      = 0x0000;
  3558.     const UINT MF_BITMAP      = 0x0004;
  3559.     const UINT MF_OWNERDRAW   = 0x0100;
  3560.  
  3561.     const UINT MF_POPUP       = 0x0010;
  3562.     const UINT MF_MENUBARBREAK = 0x0020;
  3563.     const UINT MF_MENUBREAK   = 0x0040;
  3564.  
  3565.     const UINT MF_UNHILITE    = 0x0000;
  3566.     const UINT MF_HILITE      = 0x0080;
  3567.  
  3568.     const UINT MF_SYSMENU     = 0x2000;
  3569.     const UINT MF_HELP        = 0x4000;
  3570.     const UINT MF_MOUSESELECT = 0x8000;
  3571.  
  3572.     const UINT MF_END         = 0x0080; // Only valid in menu resource templates
  3573.  
  3574.     // Flags for TrackPopupMenu
  3575.     const UINT TPM_LEFTBUTTON   = 0x0000;
  3576.     const UINT TPM_RIGHTBUTTON  = 0x0002;
  3577.     const UINT TPM_LEFTALIGN    = 0x0000;
  3578.     const UINT TPM_CENTERALIGN  = 0x0004;
  3579.     const UINT TPM_RIGHTALIGN   = 0x0008;
  3580.  
  3581.     const UINT TPM_TOPALIGN     = 0x0000;
  3582.     const UINT TPM_VCENTERALIGN = 0x0010;
  3583.     const UINT TPM_BOTTOMALIGN  = 0x0020;
  3584.  
  3585.     const UINT TPM_HORIZONTAL   = 0x0000;     // Horz alignment matters more
  3586.     const UINT TPM_VERTICAL     = 0x0040;     // Vert alignment matters more
  3587.     const UINT TPM_NONOTIFY     = 0x0080;     // Don't send any notification msgs
  3588.     const UINT TPM_RETURNCMD    = 0x0100;
  3589.  
  3590.     // WM_PRINT flags
  3591.     const ULONG PRF_CHECKVISIBLE    = 0x00000001;
  3592.     const ULONG PRF_NONCLIENT       = 0x00000002;
  3593.     const ULONG PRF_CLIENT          = 0x00000004;
  3594.     const ULONG PRF_ERASEBKGND      = 0x00000008;
  3595.     const ULONG PRF_CHILDREN        = 0x00000010;
  3596.     const ULONG PRF_OWNED           = 0x00000020;
  3597.  
  3598.     // 3D border styles
  3599.     const UINT BDR_RAISEDOUTER  = 0x0001;
  3600.     const UINT BDR_SUNKENOUTER  = 0x0002;
  3601.     const UINT BDR_RAISEDINNER  = 0x0004;
  3602.     const UINT BDR_SUNKENINNER  = 0x0008;
  3603.  
  3604.     const UINT BDR_OUTER        = 0x0003;
  3605.     const UINT BDR_INNER        = 0x000c;
  3606.     const UINT BDR_RAISED       = 0x0005;
  3607.     const UINT BDR_SUNKEN       = 0x000a;
  3608.  
  3609.     const UINT EDGE_RAISED      = 0x0005; // BDR_RAISEDOUTER | BDR_RAISEDINNER
  3610.     const UINT EDGE_SUNKEN      = 0x000a; // BDR_SUNKENOUTER | BDR_SUNKENINNER
  3611.     const UINT EDGE_ETCHED      = 0x0006; // BDR_SUNKENOUTER | BDR_RAISEDINNER
  3612.     const UINT EDGE_BUMP        = 0x0009; // BDR_RAISEDOUTER | BDR_SUNKENINNER
  3613.  
  3614.     // Border flags
  3615.     const UINT BF_LEFT          = 0x0001;
  3616.     const UINT BF_TOP           = 0x0002;
  3617.     const UINT BF_RIGHT         = 0x0004;
  3618.     const UINT BF_BOTTOM        = 0x0008;
  3619.  
  3620.     const UINT BF_TOPLEFT       = 0x0003; // BF_TOP | BF_LEFT
  3621.     const UINT BF_TOPRIGHT      = 0x0006; // BF_TOP | BF_RIGHT
  3622.     const UINT BF_BOTTOMLEFT    = 0x0009; // BF_BOTTOM | BF_LEFT
  3623.     const UINT BF_BOTTOMRIGHT   = 0x000c; // BF_BOTTOM | BF_RIGHT
  3624.     const UINT BF_RECT          = 0x000f; // BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM
  3625.  
  3626.     const UINT BF_DIAGONAL      = 0x0010;
  3627.  
  3628.     // For diagonal lines, the BF_RECT flags specify the end point of the
  3629.     // vector bounded by the rectangle parameter.
  3630.     const UINT BF_DIAGONAL_ENDTOPRIGHT      = 0x0016; // BF_DIAGONAL | BF_TOP | BF_RIGHT
  3631.     const UINT BF_DIAGONAL_ENDTOPLEFT       = 0x0013; // BF_DIAGONAL | BF_TOP | BF_LEFT
  3632.     const UINT BF_DIAGONAL_ENDBOTTOMLEFT    = 0x0019; // BF_DIAGONAL | BF_BOTTOM | BF_LEFT
  3633.     const UINT BF_DIAGONAL_ENDBOTTOMRIGHT   = 0x001c; // BF_DIAGONAL | BF_BOTTOM | BF_RIGHT
  3634.  
  3635.     const UINT BF_MIDDLE    = 0x0800;   // Fill in the middle
  3636.     const UINT BF_SOFT      = 0x1000;   // For softer buttons
  3637.     const UINT BF_ADJUST    = 0x2000;   // Calculate the space left over
  3638.     const UINT BF_FLAT      = 0x4000;   // For flat rather than 3D borders
  3639.     const UINT BF_MONO      = 0x8000;   // For monochrome borders
  3640.  
  3641.     // Flags for DrawFrameControl
  3642.  
  3643.     const UINT DFC_CAPTION          = 1;
  3644.     const UINT DFC_MENU             = 2;
  3645.     const UINT DFC_SCROLL           = 3;
  3646.     const UINT DFC_BUTTON           = 4;
  3647.  
  3648.     const UINT DFCS_CAPTIONCLOSE    = 0x0000;
  3649.     const UINT DFCS_CAPTIONMIN      = 0x0001;
  3650.     const UINT DFCS_CAPTIONMAX      = 0x0002;
  3651.     const UINT DFCS_CAPTIONRESTORE  = 0x0003;
  3652.     const UINT DFCS_CAPTIONHELP     = 0x0004;
  3653.  
  3654.     const UINT DFCS_MENUARROW       = 0x0000;
  3655.     const UINT DFCS_MENUCHECK       = 0x0001;
  3656.     const UINT DFCS_MENUBULLET      = 0x0002;
  3657.     const UINT DFCS_MENUARROWRIGHT  = 0x0004;
  3658.  
  3659.     const UINT DFCS_SCROLLUP        = 0x0000;
  3660.     const UINT DFCS_SCROLLDOWN      = 0x0001;
  3661.     const UINT DFCS_SCROLLLEFT      = 0x0002;
  3662.     const UINT DFCS_SCROLLRIGHT     = 0x0003;
  3663.     const UINT DFCS_SCROLLCOMBOBOX  = 0x0005;
  3664.     const UINT DFCS_SCROLLSIZEGRIP  = 0x0008;
  3665.     const UINT DFCS_SCROLLSIZEGRIPRIGHT = 0x0010;
  3666.  
  3667.     const UINT DFCS_BUTTONCHECK     = 0x0000;
  3668.     const UINT DFCS_BUTTONRADIOIMAGE =  0x0001;
  3669.     const UINT DFCS_BUTTONRADIOMASK = 0x0002;
  3670.     const UINT DFCS_BUTTONRADIO     = 0x0004;
  3671.     const UINT DFCS_BUTTON3STATE    = 0x0008;
  3672.     const UINT DFCS_BUTTONPUSH      = 0x0010;
  3673.  
  3674.     const UINT DFCS_INACTIVE        = 0x0100;
  3675.     const UINT DFCS_PUSHED          = 0x0200;
  3676.     const UINT DFCS_CHECKED         = 0x0400;
  3677.     const UINT DFCS_ADJUSTRECT      = 0x2000;
  3678.     const UINT DFCS_FLAT            = 0x4000;
  3679.     const UINT DFCS_MONO            = 0x8000;
  3680.  
  3681.     // Flags for DrawCaption
  3682.     const UINT DC_ACTIVE        = 0x0001;
  3683.     const UINT DC_SMALLCAP      = 0x0002;
  3684.     const UINT DC_ICON          = 0x0004;
  3685.     const UINT DC_TEXT          = 0x0008;
  3686.     const UINT DC_INBUTTON      = 0x0010;
  3687.     const UINT DC_CAPTION       = 0x001C;   // (DC_ICON | DC_TEXT | DC_BUTTONS)
  3688.     const UINT DC_NC            = 0x001C;   // (DC_CAPTION | DC_FRAME)
  3689.  
  3690.     const UINT IDANI_OPEN       = 1;
  3691.     const UINT IDANI_CLOSE      = 2;
  3692.     const UINT IDANI_CAPTION    = 3;
  3693.  
  3694.  
  3695.     [ helpstring("ExitWindows: Restart flag") ]
  3696.     const UINT EW_RESTARTWINDOWS = 0x42;
  3697.     [ helpstring("ExitWindows: Reboot flag") ]
  3698.     const UINT EW_REBOOTSYSTEM   = 0x43;
  3699.     const UINT EW_EXITANDEXECAPP = 0x0044;
  3700.  
  3701.     [ helpstring("ExitWindowsEx: Log off flag") ]
  3702.     const UINT EWX_LOGOFF   = 0x0;
  3703.     [ helpstring("ExitWindowsEx: Shut down flag") ]
  3704.     const UINT EWX_SHUTDOWN = 0x1;
  3705.     [ helpstring("ExitWindowsEx: Shut down and reboot flag") ]
  3706.     const UINT EWX_REBOOT   = 0x2;
  3707.     [ helpstring("ExitWindowsEx: Force termination of applications without prompting flag") ]
  3708.     const UINT EWX_FORCE    = 0x4;
  3709.     [ helpstring("ExitWindowsEx: Shut down and power off flag") ]
  3710.     const UINT EWX_POWEROFF = 0x8;
  3711.  
  3712.  
  3713.     // OEM Resource Ordinal Numbers
  3714.     const long OBM_CLOSE           = 32754;
  3715.     const long OBM_UPARROW         = 32753;
  3716.     const long OBM_DNARROW         = 32752;
  3717.     const long OBM_RGARROW         = 32751;
  3718.     const long OBM_LFARROW         = 32750;
  3719.     const long OBM_REDUCE          = 32749;
  3720.     const long OBM_ZOOM            = 32748;
  3721.     const long OBM_RESTORE         = 32747;
  3722.     const long OBM_REDUCED         = 32746;
  3723.     const long OBM_ZOOMD           = 32745;
  3724.     const long OBM_RESTORED        = 32744;
  3725.     const long OBM_UPARROWD        = 32743;
  3726.     const long OBM_DNARROWD        = 32742;
  3727.     const long OBM_RGARROWD        = 32741;
  3728.     const long OBM_LFARROWD        = 32740;
  3729.     const long OBM_MNARROW         = 32739;
  3730.     const long OBM_COMBO           = 32738;
  3731.     const long OBM_UPARROWI        = 32737;
  3732.     const long OBM_DNARROWI        = 32736;
  3733.     const long OBM_RGARROWI        = 32735;
  3734.     const long OBM_LFARROWI        = 32734;
  3735.  
  3736.     const long OBM_OLD_CLOSE       = 32767;
  3737.     const long OBM_SIZE            = 32766;
  3738.     const long OBM_OLD_UPARROW     = 32765;
  3739.     const long OBM_OLD_DNARROW     = 32764;
  3740.     const long OBM_OLD_RGARROW     = 32763;
  3741.     const long OBM_OLD_LFARROW     = 32762;
  3742.     const long OBM_BTSIZE          = 32761;
  3743.     const long OBM_CHECK           = 32760;
  3744.     const long OBM_CHECKBOXES      = 32759;
  3745.     const long OBM_BTNCORNERS      = 32758;
  3746.     const long OBM_OLD_REDUCE      = 32757;
  3747.     const long OBM_OLD_ZOOM        = 32756;
  3748.     const long OBM_OLD_RESTORE     = 32755;
  3749.  
  3750.     const long OCR_NORMAL          = 32512;
  3751.     const long OCR_IBEAM           = 32513;
  3752.     const long OCR_WAIT            = 32514;
  3753.     const long OCR_CROSS           = 32515;
  3754.     const long OCR_UP              = 32516;
  3755.     const long OCR_SIZE            = 32640;
  3756.     const long OCR_ICON            = 32641;
  3757.     const long OCR_SIZENWSE        = 32642;
  3758.     const long OCR_SIZENESW        = 32643;
  3759.     const long OCR_SIZEWE          = 32644;
  3760.     const long OCR_SIZENS          = 32645;
  3761.     const long OCR_SIZEALL         = 32646;
  3762.     const long OCR_ICOCUR          = 32647;
  3763.  
  3764.     const long OIC_SAMPLE          = 32512;
  3765.     const long OIC_HAND            = 32513;
  3766.     const long OIC_QUES            = 32514;
  3767.     const long OIC_BANG            = 32515;
  3768.     const long OIC_NOTE            = 32516;
  3769.  
  3770.     // Predefined Resource Types
  3771.     [ helpstring("FindResource: Resource type") ]
  3772.     const long RT_CURSOR        = 1;
  3773.     [ helpstring("FindResource: Resource type") ]
  3774.     const long RT_BITMAP        = 2;
  3775.     [ helpstring("FindResource: Resource type") ]
  3776.     const long RT_ICON          = 3;
  3777.     [ helpstring("FindResource: Resource type") ]
  3778.     const long RT_MENU          = 4;
  3779.     [ helpstring("FindResource: Resource type") ]
  3780.     const long RT_DIALOG        = 5;
  3781.     [ helpstring("FindResource: Resource type") ]
  3782.     const long RT_STRING        = 6;
  3783.     [ helpstring("FindResource: Resource type") ]
  3784.     const long RT_FONTDIR       = 7;
  3785.     [ helpstring("FindResource: Resource type") ]
  3786.     const long RT_FONT          = 8;
  3787.     [ helpstring("FindResource: Resource type") ]
  3788.     const long RT_ACCELERATOR   = 9;
  3789.     [ helpstring("FindResource: Resource type") ]
  3790.     const long RT_RCDATA        = 10;
  3791.     [ helpstring("FindResource: Resource type") ]
  3792.     const long RT_MESSAGETABLE  = 11;
  3793.  
  3794.     [ helpstring("FindResource: Resource type") ]
  3795.     const long RT_GROUP_CURSOR  = 12;
  3796.     [ helpstring("FindResource: Resource type") ]
  3797.     const long RT_GROUP_ICON    = 14;
  3798.  
  3799.     [ helpstring("FindResource: Resource type") ]
  3800.     const long RT_VERSION        = 16;
  3801.     [ helpstring("FindResource: Resource type") ]
  3802.     const long RT_DLGINCLUDE    = 17;
  3803.     [ helpstring("FindResource: Resource type") ]
  3804.     const long RT_PLUGPLAY        = 19;
  3805.     [ helpstring("FindResource: Resource type") ]
  3806.     const long RT_VXD            = 20;
  3807.  
  3808.     // DrawText() Format Flags
  3809.     const UINT DT_TOP       = 0x0000;
  3810.     const UINT DT_LEFT      = 0x0000;
  3811.     const UINT DT_CENTER        = 0x0001;
  3812.     const UINT DT_RIGHT     = 0x0002;
  3813.     const UINT DT_VCENTER   = 0x0004;
  3814.     const UINT DT_BOTTOM        = 0x0008;
  3815.     const UINT DT_WORDBREAK = 0x0010;
  3816.     const UINT DT_SINGLELINE    = 0x0020;
  3817.     const UINT DT_EXPANDTABS    = 0x0040;
  3818.     const UINT DT_TABSTOP   = 0x0080;
  3819.     const UINT DT_NOCLIP        = 0x0100;
  3820.     const UINT DT_EXTERNALLEADING  = 0x0200;
  3821.     const UINT DT_CALCRECT  = 0x0400;
  3822.     const UINT DT_NOPREFIX  = 0x0800;
  3823.     const UINT DT_INTERNAL  = 0x1000;
  3824.  
  3825.  
  3826. }   // End module UserConst
  3827.